Index: applications/ecommerce/webapp/ecommerce/order/CheckoutProcess.ftl
===================================================================
--- applications/ecommerce/webapp/ecommerce/order/CheckoutProcess.ftl	(revision 0)
+++ applications/ecommerce/webapp/ecommerce/order/CheckoutProcess.ftl	(revision 0)
@@ -0,0 +1,791 @@
+<#--<script language="javascript" src="http://localhost:8080/ecommerce/js/cartrules.js" type="text/javascript"></script>-->
+<div class="screenlet">
+  <div class="screenlet-header">
+    <div class='boxhead'>STEP1: Checkout </div>
+  </div> 
+  <#if shoppingCart?has_content && shoppingCart.size() gt 0>
+    <div class="screenlet-body">
+     <form class="theform" name="cartform" action="<@ofbizUrl>modifycart</@ofbizUrl>" method="post">
+      <input type="hidden" name="removeSelected" value="false">
+    
+      <table width="100%" border="0" cellpadding="0">
+        <tr>
+          <td width="10%" align="left"><span class="tableheadtext"><b>Item</b></span></td>               
+          <td width="35%" align="left"><span class="tableheadtext"><b>Description</b></span></td>
+          <td width="10%" align="left"><span class="tableheadtext"></span></td>
+          <td width="10%" align="left"><span class="tableheadtext"></span></td>
+          <td width="10%" align="left"><span class="tableheadtext"><b>Qty</b></span></td>
+          <td width="10%" align="left"><span class="tableheadtext"><b>Price</b></span></td>
+          <td width="10%" align="left"><span class="tableheadtext"><b>Edit</b></span></td>
+          <td width="10%" align="left"><span class="tableheadtext"><b>Remove</b></span></td>
+        </tr>
+        <tr><td colspan="8"><hr class="sepbar"/></td></tr>
+        <#list shoppingCart.items() as cartLine>
+          <#assign cartLineIndex = shoppingCart.getItemIndex(cartLine)>
+          <#assign lineOptionalFeatures = cartLine.getOptionalProductFeatures()>
+          <tr>
+            <td>
+              <#if cartLine.getProductId()?exists>
+                <#if cartLine.getParentProductId()?exists>
+                  <#assign parentProductId = cartLine.getParentProductId()/>
+                <#else>
+                  <#assign parentProductId = cartLine.getProductId()/>
+                </#if>
+                <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)?if_exists>
+                <#if !smallImageUrl?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if>
+                <#if smallImageUrl?has_content>
+                  <a href="<@ofbizUrl>product?product_id=${parentProductId}</@ofbizUrl>">
+                    <img src="<@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${smallImageUrl}</@ofbizContentUrl>" align="left" width="75" height="75" class="imageborder" border="0"/>
+                  </a>
+                </#if>
+              </#if>
+            </td>
+            <td>
+              <a href="<@ofbizUrl>product?product_id=${parentProductId}</@ofbizUrl>" class="linktext">${cartLine.getProductId()} -
+                ${cartLine.getName()?if_exists}</a> : ${cartLine.getDescription()?if_exists}
+            </td>
+            <td></td>
+            <td></td>
+            <td>
+                <input size="3" class="inputBox" type="text" name="update_${cartLineIndex}" value="${cartLine.getQuantity()?string.number}" title="you can change item quantity to recalculate the cart">
+            </td>
+            <#if cartLine.getIsPromo()>
+                <td>FREE</td>
+            <#else>
+                <td><@ofbizCurrency amount=cartLine.getDisplayPrice() isoCode=shoppingCart.getCurrency()/></td>
+            </#if>
+            <td></td>
+            <td></td>
+          </tr>
+          <tr><td colspan="8"><hr class="sepbar"/></td></tr>
+        </#list>
+        <#if shoppingCart?has_content>                                        
+          <tr>
+            <td align="right" colspan="7"><div class="tabletext"><b>Subtotal</b></div></td>
+            <td align="right">
+              <div class="tabletext"><@ofbizCurrency amount=shoppingCart.getSubTotal() isoCode=shoppingCart.getCurrency()/></div>
+            </td>
+          </tr>
+          <tr>
+            <td align="right" colspan="7"><div class="tabletext"><b>Discount</b></div></td>
+            <#--<td></td>-->
+            <td align="right">
+              <div class="tabletext">
+                <#if shoppingCart.getAdjustments()?has_content>
+                  <#list shoppingCart.getAdjustments() as cartAdjustment>
+                    <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(cartAdjustment, shoppingCart.getSubTotal()) isoCode=shoppingCart.getCurrency()/>
+                  </#list>
+                  <#else>$0.00
+                </#if> 
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td align="right" colspan="7"><div class="tabletext"><b>Shipping</b></div></td>
+              <#--<td></td>-->
+              <td align="right">
+                <div class="tabletext">
+                  <#if (shoppingCart.getTotalShipping() > 0.0)>
+                      <@ofbizCurrency amount=shoppingCart.getTotalShipping() isoCode=shoppingCart.getCurrency()/>
+                    <#else>$0.00
+                  </#if>
+                </div>
+              </td>
+            </tr>    
+            <tr>
+              <td align="right" colspan="7"><div class="tabletext"><b>Tax</b></div></td>
+              <#--<td></td>-->
+              <td align="right">
+                <div class="tabletext">
+                  <#if (shoppingCart.getTotalSalesTax() > 0.0)>
+                    <@ofbizCurrency amount=shoppingCart.getTotalSalesTax() isoCode=shoppingCart.getCurrency()/>
+                    <#else>$0.00
+                  </#if>
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td align="right" colspan="7"><div class="tabletext"><b>Total</b></div></td>
+              <#--<td></td>-->
+              <td align="right">
+                <div class="tabletext">
+                  <@ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()/>
+                </div>
+              </td>
+            </tr>
+        </#if> 
+      </table>
+     </form>
+    </div> 
+  <#else>
+    <h2>You current have no items in your cart.  Click <a href="<@ofbizUrl>main</@ofbizUrl>">here</a> to view our products!.</h2>
+  </#if>  
+</div>
+<div class="screenlet">
+  <div class="screenlet-header">
+    <div class='boxhead'>STEP2: Shipping
+      <span class="completed" style="display:none" id="completed1">
+        <a href="javascript:void(0);" id="step2open" title="Step 2 is complete. Click here to modify the informaton in this section"><div class='boxhead'>Complete!</div></a>
+      </span>
+    </div>
+  </div>
+  <div class="screenlet-body">
+    <form name="checkoutform" id="shippingContactAndMethodType" class="theform" action="<@ofbizUrl>createUpdateCustomerAndShippingContact</@ofbizUrl>" method="post">
+      <input type="hidden" id="shippingContactMechId" name="shippingContactMechId" value="${parameters.shippingContactMechId?if_exists}"/>
+      <input type="hidden" name="contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
+      <input type="hidden" name="newCustTelecomFields" value="Y"/>
+      <input type="hidden" name="shipOptionsResult" value="${parameters.shipOptionsResult?if_exists}">
+      <input type="hidden" id="shippingPartyId" name="partyId" value="${parameters.partyId?if_exists}"/>
+      <input type="hidden" name="userLogin" value="${parameters.userLogin?if_exists}"/>
+      <input type="hidden" id="phoneContactMechId" name="phoneContactMechId" value="${parameters.phoneContactMechId?if_exists}"/>
+      <input type="hidden" id="emailContactMechId" name="emailContactMechId" value="${parameters.emailContactMechId?if_exists}"/>
+      <div class="panelBody" id="step2"><#--style="display:none"-->
+        <table width="100%" border="0" cellpadding="0">
+          <tr>
+            <td>
+              <fieldset class="left">
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.OrderSelectShippingMethod}</label>
+                  </div>
+                  <div class="field-widget">
+                    <select id="shipmethod" name="shipping_method" class="required">
+                      <#list carrierShipmentMethodList as carrierShipmentMethod>
+                        <#assign shippingMethod = carrierShipmentMethod.shipmentMethodTypeId + "@" + carrierShipmentMethod.partyId>
+                        <option value="${shippingMethod}" <#if ((chosenShippingMethod)?exists && chosenShippingMethod == shippingMethod)>SELECTED</#if>>
+                          <#assign shippingEst = shippingEstWpr.getShippingEstimate(carrierShipmentMethod)?default(-1)>
+                          <#if carrierShipmentMethod.partyId != "_NA_">
+                            ${carrierShipmentMethod.partyId?if_exists}&nbsp;
+                          </#if>
+                          ${carrierShipmentMethod.description?if_exists}
+                          <#if shippingEst?has_content> - <#if (shippingEst > -1)><@ofbizCurrency amount=shippingEst isoCode=shoppingCart.getCurrency()/><#else>${uiLabelMap.OrderCalculatedOffline}</#if></#if>
+                        </option>
+                      </#list>
+                    </select>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyFirstName}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="firstName" name="firstName" class="required" type="text" value="${parameters.firstName?if_exists}" size=35 title="Please enter your first name. This field is required"/>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyMiddleName}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="middleName" name="middleName" class="required" type="text" value="${parameters.middleName?if_exists}" size=35/>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyLastName}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="lastName" name="lastName" class="required" type="text" value="${parameters.lastName?if_exists}" size=35 title="Please enter your last name. This field is required"/>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyAddressLine1}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="shipToAddress1" name="shipToAddress1" class="required" type="text" value="${parameters.address1_0?if_exists}" size=35 title="Please enter your street address."/>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyAddressLine2}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="address2" name="shipToAddress2" type="text" value="${parameters.address2_0?if_exists}" size=35 title=""/>
+                  </div>
+                </div>
+              </fieldset>
+              <fieldset class="right">
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.CommonCity}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="city" name="shipToCity" class="required" type="text" value="${parameters.city_0?if_exists}" title="Please enter your city" />
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.CommonState}</label>
+                  </div>
+                  <div class="field-widget">
+                    <select class="required" id="state" name="shipToStateProvinceGeoId">
+                      <option value="State">State</option>
+                      <#if (parameters.stateProvinceGeoId_0)?exists>
+                        <option>${parameters.stateProvinceGeoId_0}</option>
+                        <option value="${parameters.stateProvinceGeoId_0}"</option>
+                      <#else>
+                        <option value="CA">CA</option>
+                      </#if>
+                      ${screens.render("component://common/widget/CommonScreens.xml#states")}
+                    </select>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyZipCode}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="shipToPostalCode" name="shipToPostalCode" class="required validate-digits" type="text" value="${parameters.postalCode_0?if_exists}" title="please enter zip code" size=12 maxlength="15" />
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.CommonCountry}</label>
+                  </div>
+                  <div class="field-widget">
+                    <select class="field select large" id="country" name="shipToCountryGeoId">
+                      <#if (parameters.countryGeoId_0)?exists>
+                        <option>${parameters.countryGeoId_0}</option>
+                        <option value="${parameters.countryGeoId_0}">---</option>
+                      </#if>
+                      ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+                    </select>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyHomePhone}</label>
+                  </div>
+                  <div class="field-widget">
+                    <span>
+                      <input name="countryCode"  class="required validate-digits" size="3" maxlength="3" value="${parameters.workCountryCode?if_exists}" type="text"/>-
+                    </span>
+                    <span>
+                      <input id="areaCode" name="areaCode"  class="required validate-digits" size="3" maxlength="3" value="${parameters.workAreaCode?if_exists}" type="text"/>-
+                    </span>
+                    <span>
+                      <input id="contactNumber"  class="required validate-digits" name="contactNumber" size="7" maxlength="7" value="${parameters.workContactNumber?if_exists}" type="text"/>
+                    </span>
+                    <span>
+                      ext <input id="extension"  name="extension" size="6" maxlength="6" value="${parameters.workExt?if_exists}" type="text"/>
+                    </span>
+                  </div>
+                </div>
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.PartyEmailAddress}</label>
+                  </div>
+                  <div class="field-widget">
+                    <input id="email" name="emailAddress" class="required validate-email" type="text" value="${parameters.emailAddress?if_exists}" title="Enter valid email address"/>
+                  </div>
+                </div>
+              </fieldset>
+            </td>
+          </tr>
+        </table>
+        <span id="stepButton">
+          <a href="javascript:void(0);" id="step1close" title="Continue to Step 3">
+            Continue to Step 3
+          </a>
+        </span>
+      </div>
+    </form>
+  </div>
+</div>
+<div class="screenlet">
+  <div class="screenlet-header">
+    <div class='boxhead'>STEP3: Billing
+      <span class="completed" style="display:none" id="completed2">
+        <a href="javascript:void(0);" id="step3open" title="Step 3 is complete. Click here to modify the informaton in this section"><div class='boxhead'>Complete!</div></a>
+      </span>
+    </div>
+  </div>
+  <div class="screenlet-body">
+    <form name="billingForm" id="billingContactAndPaymentMethod" class="theform" action="<@ofbizUrl>createUpdateBillingAndPayment</@ofbizUrl>" method="post">
+      <input type="hidden" id ="billToContactMechId" name="billingContactMechId" value="${parameters.billingContactMechId?if_exists}"/>
+      <input type="hidden" id="paymentMethodId" name="paymentMethodId" value="${parameters.paymentMethodId?if_exists}"/>
+      <input type="hidden" id="eftAccountPaymentMethodId" name="eftAccountPaymentMethodId" value="${parameters.eftAccountPaymentMethodId?if_exists}"/>
+      <input type="hidden" id="extOfflinePaymentMethodId" name="extOfflinePaymentMethodId" value="${parameters.extOfflinePaymentMethodId?if_exists}"/>
+      <input type="hidden" name="singleUsePayment" value="Y"/>
+      <input type="hidden" name="appendPayment" value="Y"/>
+      <input type="hidden" id="paymentMethodTypeId" name="paymentMethodTypeId" value="CREDIT_CARD"/>
+      <input type="hidden" id="billingPartyId" name="billingPartyId" value="${parameters.partyId?if_exists}"/>
+      <input type="hidden" name="userLogin" value="${parameters.userLogin?if_exists}"/>
+      <input type="hidden" name="expireDate" value="${parameters.expireDate?if_exists}"/>
+                
+      <input type="hidden" id="billToPhoneContactMechId" name="phoneContactMechId" value="${parameters.billToPhoneContactMechId?if_exists}"/>                        
+      <input type="hidden" name="countryCode" value="1"/>
+      <input type="hidden" id="billToEmailContactMechId" name="emailContactMechId" value="${parameters.billToEmailContactMechId?if_exists}"/>
+                
+      <input type="hidden" id="cardTypeValue" name="cardTypeValue" value="Visa"/>
+      <input type="hidden" id="count" name="count" value="0" />
+      <input type="hidden" name="pmid" value="${parameters.paymentMethodTypeId?if_exists}" />
+      <#--<input type="hidden" name="addGiftCard" value="Y" />-->
+      
+      <div class="panelBody" id="step3"><#-- style="display:none">-->
+        <table width="100%" border="0" cellpadding="0">
+          <tr>
+            <td>
+              <fieldset class="left">
+                <div class="form-row">
+                  <div class="field-label">
+                    <label class="tabletext">${uiLabelMap.AccountingCardType}</label>
+                  </div>
+                  <div class="field-widget">
+                    <select id="paymentMethodTypeOptionList" name="paymentMethodTypeOptionList" class="selectBox">
+                      <option value="none">Select One</option>
+                      <#if productStorePaymentMethodTypeIdMap.CREDIT_CARD?exists>
+                        <option value="CREDIT_CARD" <#if (parameters.paymentMethodTypeId?default("") == "CREDIT_CARD")> selected</#if>>${uiLabelMap.AccountingVisaMastercardAmexDiscover}</option>
+                      </#if> 
+                      <#if productStorePaymentMethodTypeIdMap.EFT_ACCOUNT?exists>
+                        <option value="EFT_ACCOUNT" <#if (parameters.paymentMethodTypeId?default("") == "EFT_ACCOUNT")> selected</#if>>${uiLabelMap.AccountingAHCElectronicCheck}</option>
+                      </#if>
+                      <#if productStorePaymentMethodTypeIdMap.EXT_OFFLINE?exists>
+                        <option value="EXT_OFFLINE" <#if (parameters.paymentMethodTypeId?default("") == "EXT_OFFLINE")> selected</#if>>${uiLabelMap.OrderPaymentOfflineCheckMoney}</option>
+                      </#if>
+                    </select>
+                  </div>
+                </div>
+                <#--credit card info....--> 
+                <div id="creditCardInfoSection" style="display:none">
+                  <#if !creditCard?has_content>
+                    <#assign creditCard = requestParameters>
+                  </#if>
+                  <#if !paymentMethod?has_content>
+                    <#assign paymentMethod = requestParameters>
+                  </#if>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tableheadtext">${uiLabelMap.AccountingCreditCardInformation}</label>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingCompanyNameOnCard}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="30" maxlength="60" name="companyNameOnCard" value="${parameters.companyNameOnCard?if_exists}"/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingPrefixCard}</label>
+                    </div>
+                    <div class="field-widget">
+                      <select name="titleOnCard" class="selectBox">
+                        <#if (parameters.titleOnCard)?exists>
+                          <option>${parameters.titleOnCard}</option>
+                          <option value="${parameters.titleOnCard}">---</option>
+                        </#if>
+                        <option value="">${uiLabelMap.CommonSelectOne}</option>
+                        <option<#if ((creditCard.titleOnCard)?default("") == "${uiLabelMap.CommonTitleMr}")> selected</#if>>${uiLabelMap.CommonTitleMr}</option>
+                        <option<#if ((creditCard.titleOnCard)?default("") == "Mrs.")> selected</#if>>${uiLabelMap.CommonTitleMrs}</option>
+                        <option<#if ((creditCard.titleOnCard)?default("") == "Ms.")> selected</#if>>${uiLabelMap.CommonTitleMs}</option>
+                        <option<#if ((creditCard.titleOnCard)?default("") == "Dr.")> selected</#if>>${uiLabelMap.CommonTitleDr}</option>
+                      </select>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingFirstNameCard}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="60" name="firstNameOnCard" value="${(parameters.firstNameOnCard)?if_exists}"/>
+                      <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingMiddleNameCard}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="15" maxlength="60" name="middleNameOnCard" value="${(parameters.middleNameOnCard)?if_exists}"/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingLastNameCard}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="60" name="lastNameOnCard" value="${(parameters.lastNameOnCard)?if_exists}"/>
+                      <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingSuffixCard}</label>
+                    </div>
+                    <div class="field-widget">
+                      <select name="suffixOnCard" class="selectBox">
+                        <#if (parameters.suffixOnCard)?exists>
+                          <option>${parameters.suffixOnCard}</option>
+                          <option value="${parameters.suffixOnCard}">---</option>
+                        </#if>
+                        <option value="">${uiLabelMap.CommonSelectOne}</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "Jr.")> selected</#if>>Jr.</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "Sr.")> selected</#if>>Sr.</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "I")> selected</#if>>I</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "II")> selected</#if>>II</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "III")> selected</#if>>III</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "IV")> selected</#if>>IV</option>
+                        <option<#if ((creditCard.suffixOnCard)?default("") == "V")> selected</#if>>V</option>
+                      </select>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingCardType}</label>
+                    </div>
+                    <div class="field-widget">
+                      <select name="cardType" class="selectBox">
+                        <#if parameters.cardType?exists>
+                          <option>${parameters.cardType}</option>
+                          <option value="${parameters.cardType}">---</option>
+                        </#if>
+                          ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
+                      </select>
+                      <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingCardNumber}</label>
+                    </div>
+                    <div class="field-widget">
+                      <#if creditCard?has_content>
+                        <#if cardNumberMinDisplay?has_content>
+                          <#-- create a display version of the card where all but the last four digits are * -->
+                          <#assign cardNumberDisplay = "">
+                          <#assign cardNumber = creditCard.cardNumber?if_exists>
+                          <#if cardNumber?has_content>
+                            <#assign size = cardNumber?length - 4>
+                            <#if (size > 0)>
+                              <#list 0 .. size-1 as foo>
+                                <#assign cardNumberDisplay = cardNumberDisplay + "*">
+                              </#list>
+                                <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]>
+                            <#else>
+                              <#-- but if the card number has less than four digits (ie, it was entered incorrectly), display it in full -->
+                              <#assign cardNumberDisplay = cardNumber>
+                            </#if>
+                          </#if>
+                          <input type="text" class="required" size="20" maxlength="30" name="cardNumber" onfocus="javascript:this.value = '';" value="${cardNumberDisplay?if_exists}">
+                        <#else>
+                          <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${parameters.cardNumber?if_exists}"/>
+                        </#if>
+                      <#else>
+                        <input type="text" class="inputBox" size="20" maxlength="30" name="cardNumber" value="${parameters.cardNumber?if_exists}"/>
+                      </#if>
+                      <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingExpirationDate}</label>
+                    </div>
+                    <div class="field-widget">
+                      <#assign expMonth = "">
+                      <#assign expYear = "">
+                      <#if creditCard?exists && parameters.expireDate?exists>
+                        <#assign expDate = parameters.expireDate>
+                        <#if (expDate?exists && expDate.indexOf("/") > 0)>
+                          <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
+                          <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
+                        </#if>
+                      </#if>
+                      <select name="expMonth" class="selectBox">
+                        <#if creditCard?has_content && expMonth?has_content>
+                          <#assign ccExprMonth = expMonth>
+                        <#else>
+                          <#assign ccExprMonth = parameters.expMonth?if_exists>
+                        </#if>
+                        <#if ccExprMonth?has_content>
+                          <option value="${ccExprMonth?if_exists}">${ccExprMonth?if_exists}</option>
+                        </#if>
+                          ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
+                      </select>
+                      <select name="expYear" class="selectBox">
+                        <#if creditCard?has_content && expYear?has_content>
+                          <#assign ccExprYear = expYear>
+                        <#else>
+                          <#assign ccExprYear = parameters.expYear?if_exists>
+                        </#if>
+                        <#if ccExprYear?has_content>
+                          <option value="${ccExprYear?if_exists}">${ccExprYear?if_exists}</option>
+                        </#if>
+                          ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
+                      </select>
+                      <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span><#else>*</#if>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonDescription}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="30" name="description" value="${paymentMethod.description?if_exists}"/>
+                    </div>
+                  </div>
+                </div>
+                <#--eft Account info.....-->
+                <div id="eftAccountInfoSection" style="display:none">
+                  <#if !eftAccount?has_content><#assign eftAccount = requestParameters></#if>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tableheadtext">${uiLabelMap.AccountingEFTAccountInformation}</label>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingNameOnAccount}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="30" maxlength="60" name="nameOnAccount" value="${eftAccount.nameOnAccount?if_exists}"/>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingCompanyNameOnAccount}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="30" maxlength="60" name="companyNameOnAccount" value="${eftAccount.companyNameOnAccount?if_exists}"/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingBankName}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="30" maxlength="60" name="bankName" value="${eftAccount.bankName?if_exists}"/>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingRoutingNumber}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="10" maxlength="30" name="routingNumber" value="${eftAccount.routingNumber?if_exists}"/>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingAccountType}</label>
+                    </div>
+                    <div class="field-widget">
+                      <select name="accountType" class='selectBox'>
+                          <option>${eftAccount.accountType?if_exists}</option>
+                          <option></option>
+                          <option>Checking</option>
+                          <option>Savings</option>
+                        </select>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingAccountNumber}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="40" name="accountNumber" value="${eftAccount.accountNumber?if_exists}"/>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonDescription}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="30" maxlength="60" name="description" value="${eftAccount.description?if_exists}"/>
+                    </div>
+                  </div>
+                </div>
+              </fieldset>
+              <fieldset class="right">
+                <div class="form-row">
+                  <div id="sameAsShipCheckBox">
+                    <input class="checkbox" id="billingToggle" name="sameAsShipping" type="checkbox"  checked="checked" value="Y" <#if parameters.sameAsShipping?has_content && parameters.sameAsShipping?default("")=="Y">checked</#if> ">
+                  </div>
+                  <div id="sameAsShipLabel">
+                    <label for="samebilling">${uiLabelMap.FacilityBillingAddressSameShipping}</label>
+                  </div>
+                </div>
+                <div id="billingaddress" style="clear:both; display:none">
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.PartyAddressLine1}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input id="address1" name="billToAddress1" class="required" size=30 type="text" value="${parameters.billToAddress1?if_exists}" title="Please enter your street address."/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.PartyAddressLine2}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input id="address2" name="billToAddress2" type="text" value="${parameters.billToAddress2?if_exists}" size=30 title="Enter your employee number, please use only alphanumeric characters"/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonCity}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input id="city" name="billToCity" class="required" type="text" value="${parameters.billToCity?if_exists}" title="Please enter your city"/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonState}</label>
+                    </div>
+                    <div class="field-widget">
+                      <select class="field select large" id="state" name="billToStateProvinceGeoId">
+                        <#if parameters.billToStateProvinceGeoId?has_content>
+                          <option>${parameters.billToStateProvinceGeoId}</option>
+                          <option value="${parameters.billToStateProvinceGeoId}">---</option>
+                        <#else>
+                          <option value=""></option>
+                        </#if>
+                        ${screens.render("component://common/widget/CommonScreens.xml#states")}
+                      </select>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.PartyZipCode}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input id="zip" name="billToPostalCode" class="required" size=12 type="text"  maxlength="15" value="${parameters.billToPostalCode?if_exists}" title="please enter zip code"/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonCountry}</label>
+                    </div>
+                    <div class="field-widget">
+                      <select class="field select large" id="country" name="billToCountryGeoId">
+                        <#if parameters.billToCountryGeoId?has_content>
+                          <option>${parameters.billToCountryGeoId}</option>
+                          <option value="${parameters.billToCountryGeoId}">---</option>
+                        </#if>
+                        ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+                      </select>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.PartyBusinessPhone}</label>
+                    </div>
+                    <div class="field-widget">
+                      <span>
+                        <input name="countryCode"  class="required validate-digits" size="3" maxlength="3" value="${parameters.homeCountryCode?if_exists}" type="text"/>-
+                      </span>
+                      <span>
+                        <input id="areaCode" name="areaCode" size="3" maxlength="3" value="${parameters.homeAreaCode?if_exists}" type="text"/>-
+                      </span>
+                      <span>
+                        <input id="billToContactNumber" name="contactNumber" size="7" maxlength="7" value="${parameters.homeContactNumber?if_exists}" type="text" title="Please enter your phone number"/>
+                      </span>
+                      <span>
+                        ext  <input id="billToExtension" name="extension" size="6" maxlength="6" value="${parameters.homeExt?if_exists}" type="text"/>
+                      </span>
+                    </div>
+                  </div>
+                </div>
+              </fieldset>
+            </td>
+          </tr>
+          <tr>
+            <td>
+              <fieldset class="left">
+                <div class="form-row" style="padding-left: 180px;">
+                  <div id="addGiftCardCheckBox">
+                    <input class="checkbox" id="addGiftCard" name="addGiftCard" type="checkbox" value="Y" <#if parameters.addGiftCard?has_content && parameters.addGiftCard?default("")=="Y">checked</#if> "/>
+                  </div>
+                  <div id="addGiftCardLabel" style="padding-left: 33px;">
+                    <label for="tabletext">${uiLabelMap.AccountingCheckGiftCard}</label>
+                  </div>
+                </div>
+                <div id="giftCardSection" style="display:none">
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tableheadtext">${uiLabelMap.AccountingGiftCardInformation}</label>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingGiftCardNumber}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="30" name="giftCardNumber" value=""/>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingPINNumber}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="30" name="giftCardPin" value=""/>*
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonDescription}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="30" name="description" value=""/>
+                    </div>
+                  </div>
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.AccountingAmountToUse}</label>
+                    </div>
+                    <div class="field-widget">
+                      <input type="text" class="inputBox" size="20" maxlength="30" name="giftCardAmount" value=""/>*
+                    </div>
+                  </div>
+                </div>
+              </fieldset>
+            </td>
+          </tr>
+        </table>
+        <span id="stepButton">
+          <a href="javascript:void(0);" id="step2close" title="Confirm Purchase">
+            Confirm Purchase
+          </a>
+        </span>
+      </div>
+    </form>
+  </div>
+</div>
+<div class="screenlet">
+    <div class="screenlet-header">
+        <div class='boxhead'>${uiLabelMap.CommonComments} </div>
+    </div>    
+    <div class="screenlet-body">
+      <form name="commentForm" id="orderComments" class="theform" action="<@ofbizUrl>addCommentsCompleteOrder</@ofbizUrl>" method="post"> 
+        <div class="panelBody" id="step4" style="display:none">        
+          <table>
+            <tr>
+              <td>
+                <fieldset class="left">
+                  <div class="form-row">
+                    <div class="field-label">
+                      <label class="tabletext">${uiLabelMap.CommonComments}</label>  
+                    </div>    
+                    <div class="field-widget"> 
+                      <textarea id="comments" class="textAreaBox" name="comments"></textarea>    
+                    </div>                                                     
+                  </div>
+                </fieldset>
+              </td>
+            </tr>         
+          </table>        
+          <span id="stepButton">
+            <a href="javascript:document.commentForm.submit();" id="finalize_order">
+              Place Order
+            </a>
+          </span>  
+        </div>
+      </form>
+    </div>
+</div>
\ No newline at end of file
Index: applications/ecommerce/webapp/ecommerce/login.ftl
===================================================================
--- applications/ecommerce/webapp/ecommerce/login.ftl	(revision 609890)
+++ applications/ecommerce/webapp/ecommerce/login.ftl	(working copy)
@@ -94,6 +94,9 @@
           <form method="post" action="<@ofbizUrl>quickAnonSetCustomer</@ofbizUrl>" style="margin: 0;">
             <div align="center"><input type="submit" class="smallSubmit" value="${uiLabelMap.EcommerceCheckoutQuick}"/></div>
           </form>
+          <form method="post" action="<@ofbizUrl>OnePageQuickAnonymousCheckOut</@ofbizUrl>" style="margin: 0;">
+            <div align="center"><input type="submit" class="smallSubmit" value="${uiLabelMap.EcommerceOnePageCheckoutQuick}"/></div>
+          </form>
         </div>
     </div>
     </#if>
Index: applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/quickAnonBillAndPaymentInfo.bsh
===================================================================
--- applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/quickAnonBillAndPaymentInfo.bsh	(revision 0)
+++ applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/quickAnonBillAndPaymentInfo.bsh	(revision 0)
@@ -0,0 +1,102 @@
+
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.*;
+import org.ofbiz.entity.util.*;
+import org.ofbiz.order.shoppingcart.*;
+import org.ofbiz.party.contact.*;
+import org.ofbiz.product.catalog.*;
+
+
+partyId = null;
+
+userLogin = context.get("userLogin");
+
+if (userLogin != null) {
+    partyId = userLogin.get("partyId");
+    parameters.put("partyId",partyId);
+    parameters.put("userLogin",userLogin);
+} else {
+    userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "anonymous"));
+    session.setAttribute("userLogin",userLogin);
+}
+
+if (partyId == null && parameters.get("partyId") != null) {
+    partyId = parameters.get("partyId");
+}
+
+shippingContactMechId = "";
+//get billing information here because we can't get billingContactMechId in request,session or parameters in /order/quickAnonCustSettings.bsh file
+billToContactMechDetail = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("PartyContactDetailByPurpose", 
+        UtilMisc.toMap("partyId", partyId, "contactMechPurposeTypeId", "BILLING_LOCATION")), true));
+billToContactMechId = "";
+if (billToContactMechDetail != null){
+    billToContactMechId = billToContactMechDetail.get("contactMechId");
+    if(billToContactMechId != null){
+        billPostalAddress = delegator.findByPrimaryKey("PostalAddress",UtilMisc.toMap("contactMechId",billToContactMechId));
+        parameters.put("billToContactMechId", billPostalAddress.get("contactMechId"));
+        parameters.put("billToAttnName", billPostalAddress.get("attnName"));
+        parameters.put("billToAddress1", billPostalAddress.get("address1"));
+        parameters.put("billToAddress2", billPostalAddress.get("address2"));
+        parameters.put("billToCity", billPostalAddress.get("city"));
+        parameters.put("billToPostalCode", billPostalAddress.get("postalCode"));
+        parameters.put("billToStateProvinceGeoId", billPostalAddress.get("stateProvinceGeoId"));
+        parameters.put("billToCountryGeoId", billPostalAddress.get("countryGeoId"));
+        billMap = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", billToContactMechId));
+        //we can get credit card,eft account information using "paymentinformation.bsh" but this file is used for registered checkout
+        creditCardMaps = billMap.getRelated("CreditCard");
+        if(creditCardMaps != null){
+            creditCardIter = creditCardMaps.iterator();
+            while (creditCardIter.hasNext()){
+                creditCardDetail = creditCardIter.next();
+                if(creditCardDetail != null){
+                    parameters.put("paymentMethodId", creditCardDetail.get("paymentMethodId"));
+                    parameters.put("cardType", creditCardDetail.get("cardType"));
+                    parameters.put("cardNumber", creditCardDetail.get("cardNumber"));
+                    parameters.put("companyNameOnCard", creditCardDetail.get("companyNameOnCard"));
+                    parameters.put("titleOnCard", creditCardDetail.get("titleOnCard"));
+                    parameters.put("suffixOnCard", creditCardDetail.get("suffixOnCard"));
+                    //parameters.put("description", creditCardDetail.get("description"));
+                    expireDate = creditCardDetail.get("expireDate");
+                    parameters.put("expireDate",expireDate);
+//                    if(UtilValidate.isNotEmpty(expireDate)){
+//                        expMonth = expireDate.substring(0,2);
+//                        expYear = expireDate.substring(3,7);
+//                        parameters.put("expMonth", expMonth);
+//                        parameters.put("expYear", expYear);
+//                    }
+                    parameters.put("firstNameOnCard", creditCardDetail.get("firstNameOnCard"));
+                    parameters.put("middleNameOnCard", creditCardDetail.get("middleNameOnCard"));
+                    parameters.put("lastNameOnCard", creditCardDetail.get("lastNameOnCard"));
+                }
+            }
+        }
+        
+        eftAccountMaps = billMap.getRelated("EftAccount");
+        if(eftAccountMaps != null){
+            eftAccountIter = eftAccountMaps.iterator();
+            while(eftAccountIter.hasNext()){
+                eftAccountDetail = eftAccountIter.next();
+                if(eftAccountDetail != null){
+                    parameters.put("paymentMethodId", eftAccountDetail.get("paymentMethodId"));
+                    parameters.put("nameOnAccount", eftAccountDetail.get("nameOnAccount"));
+                    parameters.put("companyNameOnAccount", eftAccountDetail.get("companyNameOnAccount"));
+                    parameters.put("bankName", eftAccountDetail.get("bankName"));
+                    parameters.put("routingNumber", eftAccountDetail.get("routingNumber"));
+                    parameters.put("accountType", eftAccountDetail.get("accountType"));
+                    parameters.put("accountNumber", eftAccountDetail.get("accountNumber"));
+                    //parameters.put("description", eftAccountDetail.get("description"));
+                }
+            }
+        }
+    }
+}
+
+
+if (partyId != null){
+    if(shippingContactMechId != null){
+        if(billToContactMechId != "" && billToContactMechId.equals(shippingContactMechId)){
+            parameters.put("sameAsShipping","Y");
+        }
+    }
+}
\ No newline at end of file
Index: applications/ecommerce/script/org/ofbiz/ecommerce/customer/processComments.bsh
===================================================================
--- applications/ecommerce/script/org/ofbiz/ecommerce/customer/processComments.bsh	(revision 0)
+++ applications/ecommerce/script/org/ofbiz/ecommerce/customer/processComments.bsh	(revision 0)
@@ -0,0 +1,15 @@
+import org.ofbiz.order.shoppingcart.ShoppingCartEvents;
+
+cart = ShoppingCartEvents.getCartObject(request);
+session = request.getSession();
+ 
+comments = request.getParameter("comments");
+if(comments == null){
+    cart.getOrderNotes().clear();
+ }   
+if(comments != null){
+    cart.getOrderNotes().clear();
+    cart.addOrderNote(comments);
+}
+
+return "success";
\ No newline at end of file
Index: applications/ecommerce/widget/OrderScreens.xml
===================================================================
--- applications/ecommerce/widget/OrderScreens.xml	(revision 609890)
+++ applications/ecommerce/widget/OrderScreens.xml	(working copy)
@@ -606,5 +606,42 @@
             </widgets>
         </section>
     </screen>
+    <screen name="CheckoutDetails">
+        <section>
+            <actions>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/cart/showcart.bsh"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonOptionSettings.bsh"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/quickAnonBillAndPaymentInfo.bsh"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonPaymentInformation.bsh"/>
+                <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/storepaymentoptions.bsh"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/paymentinformation.bsh"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/scriptaculous.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/prototype.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/ecommerce/images/cartrules.js" global="true"/>
+                
+                <set field="layoutSettings.styleSheets[+0]" value="/ecommerce/images/quickanononepagecheckoutprocess.css" global="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="quickAnonCheckoutDecorator">
+                    <decorator-section name="body">
+                        <include-screen name="CustSettingsAndShipOptions" location="component://ecommerce/widget/OrderScreens.xml" share-scope="true"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+   
+    <screen name="CustSettingsAndShipOptions">
+        <section>
+            <widgets>
+                <platform-specific>
+                    <html>
+                        <html-template location="component://ecommerce/webapp/ecommerce/order/CheckoutProcess.ftl"/>
+                    </html>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
     
 </screens>
Index: applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerServices.xml
===================================================================
--- applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerServices.xml	(revision 0)
+++ applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerServices.xml	(revision 0)
@@ -0,0 +1,520 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
+ 
+ <simple-method method-name="createUpdateCustomerAndShippingContact" 
+         short-description="Create/Update Customer, Shipping Address and other contact details. Set shipping method type" login-required="false">
+        
+        <!-- Address Validation via USPS validator. -->
+        <!--set field="addressValidationContext.city" value="${parameters.shipToCity}"/>
+        <set field="addressValidationContext.zip5" value="${parameters.shipToPostalCode}"/>
+        <set field="addressValidationContext.state" value="${parameters.shipToStateProvinceGeoId}"/>
+        <set field="addressValidationContext.address1" value="${parameters.shipToAddress1}"/>        
+        
+        <call-service service-name="uspsAddressValidation" in-map-name="addressValidationContext">
+            <result-to-field result-name="address1" map-name="addressValidationRespMap"/>
+            <result-to-field result-name="city" map-name="addressValidationRespMap"/>
+            <result-to-field result-name="state" map-name="addressValidationRespMap"/>
+            <result-to-field result-name="zip5" map-name="addressValidationRespMap"/>            
+        </call-service>
+        <check-errors/-->
+        <set field="parameters.shipToCity" from-field="parameters.shipToCity"/>
+        <set field="parameters.shipToAddress1" from-field="parameters.shipToAddress1"/>
+        <set field="parameters.shipToStateProvinceGeoId" from-field="parameters.shipToStateProvinceGeoId"/>
+        <set field="parameters.shipToPostalCode" from-field="parameters.shipToPostalCode"/>
+
+        <field-to-result field-name="parameters.shipToCity" result-name="shipToCity"/>
+        <field-to-result field-name="parameters.shipToAddress1" result-name="shipToAddress1"/>
+        <field-to-result field-name="parameters.shipToStateProvinceGeoId" result-name="shipToStateProvinceGeoId"/>
+        <field-to-result field-name="parameters.shipToPostalCode" result-name="shipToPostalCode"/>
+                         
+        <log level="info" message="userLogin context values ${parameters.userLogin}"/>
+        
+        <set field="shoppingCart" from-field="parameters.shoppingCart"/>        
+        <set field="userLogin" from-field="parameters.userLogin"/>
+        <set field="partyId" from-field="parameters.partyId"/>
+
+        <now-timestamp-to-env env-name="nowTimestamp"/>
+        
+        <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="person" in-map-name="parameters" out-map-name="personMap"/>
+        <!-- there is no need of merging of contact number in this method-->
+        <!--
+        <if-compare value="Y" field-name="newCustTelecomFields" operator="equals" map-name="parameters">
+            <set field="parameters.contactNumber" value="${parameters.contactNumber}${parameters.extension}"/>
+        </if-compare> 
+        -->
+        <!--
+        <if-not-empty field-name="contactNumber" map-name="parameters">
+        -->
+        <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+            processor-name="phoneNumber" in-map-name="parameters" out-map-name="phoneContext"/>
+        <!--</if-not-empty>-->
+        <log level="info" message="phoneContext context values ${phoneContext}"/>
+
+        <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/>
+
+        <!--the personContext map is not defined any where above this line and shipToToName is niether used in ftl nor in this service -->
+        <!--
+        <if-empty field-name="shipToToName" map-name="parameters">
+                <set field="parameters.shipToToName" value="${personContext.firstName} ${personContext.lastName}"  />
+        </if-empty>
+        -->
+        <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="shipToAddress" in-map-name="parameters" out-map-name="shipToAddressContext"/>
+
+        <if-compare value="USA" operator="equals" field-name="shipToCountryGeoId" map-name="parameters">
+            <if-empty field-name="shipToStateProvinceGeoId" map-name="parameters">
+                <string-to-list string="Ship To State is missing, and is required for an address in the United States."
+                        message-field-name="shipToStateProvinceGeoId" list-name="error_list"/>
+            </if-empty>
+        </if-compare>
+
+        <if-compare value="CAN" operator="equals" field-name="shipToCountryGeoId" map-name="parameters">
+            <if-empty field-name="shipToStateProvinceGeoId" map-name="parameters">
+                <string-to-list string="Ship To State is missing, and is required for an address in the Canada."
+                        message-field-name="shipToStateProvinceGeoId" list-name="error_list"/>
+            </if-empty>
+        </if-compare>
+
+
+        <check-errors/>
+
+        <!-- shipping_method parameter has value for shippingMethodTypeId and carrierPartyId seperated by @, split string and then use it -->
+        <call-bsh><![CDATA[
+           shippingMethod = parameters.get("shipping_method");
+           if(shippingMethod != null){
+              parameters.put("shipmentMethodTypeId", shippingMethod.substring(0, shippingMethod.indexOf("@")));
+              parameters.put("carrierPartyId", shippingMethod.substring(shippingMethod.indexOf("@")+1));
+           }
+        ]]></call-bsh>
+
+        <set field="shipmentMethodTypeId" from-field="parameters.shipmentMethodTypeId" />
+        <set field="carrierPartyId" from-field="parameters.carrierPartyId" />
+        <log level="info" message=" shipmentMethodTypeId is ${shipmentMethodTypeId} " />
+        <log level="info" message=" carrierPartyId is ${carrierPartyId}"/>
+        
+        <!-- person and userLogin -->
+        <set-service-fields map-name="personMap" service-name="createPerson" to-map-name="personContext"/>
+
+        <if-empty field-name="partyId">
+            <call-service service-name="createPerson" in-map-name="personContext">
+                <result-to-field result-name="partyId" field-name="partyId"/>
+            </call-service>
+            <log level="info" message="Party created partyId is ${partyId}"></log>
+        <!-- the rest of the methods require a userLogin object; so if we are anonymous lets fake it -->
+            <if-empty field-name="userLogin">
+                <set field="ulLookup.userLoginId" value="anonymous"/>
+                <find-by-primary-key entity-name="UserLogin" map-name="ulLookup" value-name="userLogin"/>
+                <set field="userLogin.partyId" from-field="partyId"/>
+                <set-current-user-login value-name="userLogin"/>
+            
+            <else><!-- of an anonymous vistor is coming back, update the party id in the userLogin object -->
+                <if-compare field-name="userLogin.userLoginId" value="anonymous" operator="equals">
+                    <set field="userLogin.partyId" from-field="partyId"/>
+                </if-compare>
+            </else>
+            </if-empty>
+        
+            <log level="info" message="userLogin is ${userLogin}"></log>
+        
+            <!-- common roleTypeId used for partyContactMechs below -->
+            <set value="CUSTOMER" field="parameters.roleTypeId"/>
+            <!-- party role -->
+            <set field="partyRoleContext.partyId" from-field="partyId"/>
+            <set field="partyRoleContext.roleTypeId" from-field="parameters.roleTypeId"/>
+            <set field="partyRoleContext.userLogin" from-field="userLogin"/>
+            <call-service service-name="createPartyRole" in-map-name="partyRoleContext"/>
+        <else>
+            <set from-field="parameters.partyId" field="personContext.partyId"/>
+            <call-service service-name="updatePerson" in-map-name="personContext"/>
+            <set field="partyId" from-field="parameters.partyId"/>
+            <log level="info" message="Party Updated partyId is ${partyId}"></log>
+        </else>
+        </if-empty>
+        
+        <field-to-result field-name="partyId"/>
+        <log level="info" message=" ${partyId}"></log>
+ 
+        <!-- ship to address Create Or Update -->
+        <set field="shipToAddressContext.partyId" from-field="partyId"/>
+        <set field="shipToAddressContext.roleTypeId" from-field="parameters.roleTypeId"/>
+        <!--<set field="shipToAddressContext.toName" from-field="parameters.shipToToName"/>-->
+        <if-empty field-name="parameters.shippingContactMechId">
+            <set value="SHIPPING_LOCATION" field="shipToAddressContext.contactMechPurposeTypeId"/>
+            <call-service service-name="createPartyPostalAddress" in-map-name="shipToAddressContext">
+                <result-to-field result-name="contactMechId" map-name="shipToAddressPurposeContext"/>
+                <result-to-field result-name="contactMechId" field-name="parameters.shippingContactMechId"/>
+            </call-service> 
+            <log level="info" message="Shipping Postal Address created shippingContactMechId is ${parameters.shippingContactMechId}"></log>
+        <else>
+            <set field="shipToAddressContext.contactMechId" from-field="parameters.shippingContactMechId"/>
+            <!-- call the update address service -->
+            <call-service service-name="updatePartyPostalAddress" in-map-name="shipToAddressContext">
+                <result-to-field result-name="contactMechId" field-name="parameters.shippingContactMechId"/>
+            </call-service>
+            <log level="info" message="Shipping Postal Address Updated shippingContactMechId is ${parameters.shippingContactMechId}"></log>
+        </else>
+        </if-empty>
+        <field-to-result field-name="parameters.shippingContactMechId" result-name="shippingContactMechId"/>
+        
+        <!-- phone Create or Update -->
+        <set field="phoneContext.partyId" from-field="partyId" />
+        <set field="phoneContext.roleTypeId" from-field="parameters.roleTypeId"/>
+        <if-empty field-name="parameters.phoneContactMechId">
+            <set field="phoneContext.contactMechPurposeTypeId" value="PHONE_WORK"/>
+            <call-service service-name="createPartyTelecomNumber" in-map-name="phoneContext">
+                <result-to-field result-name="contactMechId" field-name="parameters.phoneContactMechId"/>
+            </call-service>
+            <log level="info" message="Phone Contact created phoneContactMechId is ${parameters.phoneContactMechId}"></log>
+        <else>
+            <set field="phoneContext.contactMechId" from-field="parameters.phoneContactMechId"/>
+            <log level="info" message="Updating phoneContactMechId is ${parameters.phoneContactMechId}"></log>
+            <!-- call update telecom service -->
+            <call-service service-name="updatePartyTelecomNumber" in-map-name="phoneContext">
+                <result-to-field result-name="contactMechId" field-name="parameters.phoneContactMechId"/>
+            </call-service> 
+            <log level="info" message="Phone Contact updated phoneContactMechId is ${parameters.phoneContactMechId}"></log>
+        </else>
+        </if-empty>
+        <field-to-result field-name="parameters.phoneContactMechId" result-name="phoneContactMechId"/>
+
+        <!-- email address Create Or Update -->
+        <set from-field="partyId" field="emailAddressContext.partyId"/>
+        <set field="emailAddressContext.roleTypeId" from-field="parameters.roleTypeId"/>
+        <if-empty field-name="emailContactMechId" map-name="parameters">
+            <set field="emailAddressContext.contactMechPurposeTypeId" value="PRIMARY_EMAIL" />
+            <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressContext">
+                <result-to-field result-name="contactMechId" field-name="parameters.emailContactMechId"/>
+            </call-service>
+            <log level="info" message="Email Contact Created emailContactMechId is ${parameters.emailContactMechId}"></log>
+        <else>
+            <set field="emailAddressContext.contactMechId" from-field="parameters.emailContactMechId"/>
+            <!-- call update Email address -->
+            <call-service service-name="updatePartyEmailAddress" in-map-name="emailAddressContext">
+                <result-to-field result-name="contactMechId" field-name="parameters.emailContactMechId"/>
+            </call-service> 
+            <log level="info" message="Email Contact updated emailContactMechId is ${parameters.emailContactMechId}"></log>
+        </else>
+        </if-empty>
+        <field-to-result field-name="parameters.emailContactMechId" result-name="emailContactMechId"/>
+        
+        <!-- Set partyId, shippingContactMechId in shoppingCart -->
+        <call-object-method obj-field-name="shoppingCart" method-name="addContactMech">
+            <string value="SHIPPING_LOCATION"/>
+            <field field-name="parameters.shippingContactMechId"/>
+        </call-object-method>
+        <call-object-method obj-field-name="shoppingCart" method-name="setShippingContactMechId">
+            <field field-name="parameters.shippingContactMechId"/>
+        </call-object-method>
+        <log level="info" message="updated shopping cart shippingContactMechId ${parameters.shippingContactMechId}"/>
+        
+        <call-object-method obj-field-name="shoppingCart" method-name="setShipmentMethodTypeId">
+            <field field-name="shipmentMethodTypeId"/>
+        </call-object-method>
+        <call-object-method obj-field-name="shoppingCart" method-name="setCarrierPartyId">
+            <field field-name="carrierPartyId"/>
+        </call-object-method>
+
+        <call-object-method obj-field-name="shoppingCart" method-name="setOrderPartyId">
+            <field field-name="partyId"/>
+        </call-object-method>
+        <call-bsh><![CDATA[
+           dispatcher = parameters.get("dispatcher");
+           delegator = parameters.get("delegator");
+           locale = parameters.get("locale");
+           isoCode=shoppingCart.getCurrency();
+           
+           Map shipCost = org.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher,delegator,shoppingCart,0);
+           Double shippingTotal = (Double) shipCost.get("shippingTotal");
+           if (shippingTotal == null) {
+               shippingTotal = new Double(0.00);
+           }
+           shoppingCart.setItemShipGroupEstimate(shippingTotal.doubleValue(), 0);
+           parameters.put("shippingTotal",org.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal.doubleValue(),isoCode,locale));
+
+           checkOutHelper = new org.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, shoppingCart);
+           //Calculate and add the tax adjustments
+           checkOutHelper.calcAndAddTax();
+
+           double salesTax = shoppingCart.getTotalSalesTax();
+           totalSalesTax = org.ofbiz.base.util.UtilFormatOut.formatCurrency(salesTax,isoCode,locale);
+           parameters.put("totalSalesTax",totalSalesTax);
+
+           cartGrandTotal = org.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(),isoCode,locale);
+           parameters.put("cartGrandTotal",cartGrandTotal);
+           
+        ]]></call-bsh>
+        <field-to-result field-name="parameters.shippingTotal" result-name="shippingTotal"/>
+        <field-to-result field-name="parameters.cartGrandTotal" result-name="cartGrandTotal"/>
+        <field-to-result field-name="parameters.totalSalesTax" result-name="totalSalesTax"/>
+        <log level="info" message="Shipping charge is set to ${parameters.shippingTotal}"/>
+        <log level="info" message="Shipping charge is set to ${parameters.cartGrandTotal}"/>
+        <log level="info" message="Shipping charge is set to ${parameters.totalSalesTax}"/>
+        
+        <set field="dispatcher" from-field="parameters.dispatcher"/>
+        <call-object-method obj-field-name="shoppingCart"  method-name="setUserLogin">
+            <field field-name="userLogin"  type="org.ofbiz.entity.GenericValue"/>
+            <field field-name="dispatcher" type="org.ofbiz.service.LocalDispatcher"/>
+        </call-object-method>   
+    </simple-method>
+    
+    <simple-method method-name="createUpdateBillingAndPayment" short-description="Create Billing And Payment Information" login-required="false">
+        <!--==================processBillAndPaymentSettings Before create/update===================-->
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="not-equals">
+            <set field="parameters.billToCity" from-field="parameters.billToCity"/>
+            <set field="parameters.billToAddress1" from-field="parameters.billToAddress1"/>
+            <set field="parameters.billToStateProvinceGeoId" from-field="parameters.billToStateProvinceGeoId"/>
+            <set field="parameters.billToPostalCode" from-field="parameters.billToPostalCode"/>
+        </if-compare>
+        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
+        <if-not-empty field-name="shoppingCart">
+            <call-object-method obj-field-name="shoppingCart" method-name="getShippingContactMechId" ret-field-name="parameters.shipToContactMechId"/>
+            <log level="info" message=" Using shipToContactMechId for Billing Contact, Value is ${parameters.shipToContactMechId}"/>
+            <call-object-method obj-field-name="shoppingCart" method-name="getPartyId" ret-field-name="partyId"/>
+            <call-object-method obj-field-name="shoppingCart" method-name="getUserLogin" ret-field-name="userLogin"/>
+        <else>
+            <set field="partyId" from-field="parameters.billingPartyId"/>
+            <set field="userLogin" from-field="parameters.userLogin"/>
+        </else>
+        </if-not-empty>
+        <!--===================validateBillAndPaymentSettings================-->
+        <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="creditCard" in-map-name="parameters" out-map-name="creditCardContext"/>
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="not-equals">
+            <set field="parameters.billToToName" value="${parameters.billTofirstName} ${parameters.billTolastName}"/>
+            <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="billToAddress" in-map-name="parameters" out-map-name="billToAddressContext"/>
+			<map-to-map map-name="billToAddressContext" to-map-name="billingToAddressAndCreditCardContext"/>
+			<map-to-map map-name="creditCardContext" to-map-name="billingToAddressAndCreditCardContext"/>
+            <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="phoneNumber" in-map-name="parameters" out-map-name="homePhoneContext"/>	
+            <check-errors/>
+            <set field="billingToAddressAndCreditCardContext.partyId" from-field="partyId" />
+            <set field="homePhoneContext.partyId" from-field="partyId" />
+        </if-compare>
+        
+        <set field="creditCardContext.partyId" from-field="partyId" />
+        <!--<set field="eftAccountContext.partyId" from-field="partyId" />-->
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="not-equals">
+            <if-empty field-name="parameters.billingContactMechId">
+                <!-- call create Credit Card and Address Service -->
+                <call-service service-name="createCreditCardAndAddress" in-map-name="billingToAddressAndCreditCardContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.billingContactMechId"/>
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.paymentMethodId"/>
+                </call-service>
+            <else>
+                <!-- call update Credit Card and Address Service -->
+                <set field="billingToAddressAndCreditCardContext.contactMechId" from-field="parameters.billingContactMechId"/>
+                <set field="billingToAddressAndCreditCardContext.paymentMethodId" from-field="parameters.paymentMethodId"/>
+                <call-service service-name="updateCreditCardAndAddress" in-map-name="billingToAddressAndCreditCardContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.billingContactMechId"/>
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.paymentMethodId"/>
+                </call-service>    
+            </else>
+            </if-empty>
+                        
+            <field-to-request field-name="paymentMethodId" map-name="parameters"/>
+            <field-to-result field-name="paymentMethodId" map-name="parameters"/>
+            <field-to-request field-name="billingContactMechId" map-name="parameters"/>
+            <field-to-result field-name="billingContactMechId" map-name="parameters"/>
+            <field-to-session field-name="billingContactMechId"/>
+        </if-compare>
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="equals">
+            <if-empty field-name="parameters.billingContactMechId">
+                <!-- call create Billing Location -->
+                <set field="addressPurposeContext.partyId" from-field="partyId"/>
+                <set field="addressPurposeContext.contactMechPurposeTypeId" default-value="BILLING_LOCATION"/>
+                <set field="addressPurposeContext.contactMechId" from-field="parameters.shipToContactMechId"/>
+                <call-service service-name="createPartyContactMechPurpose" in-map-name="addressPurposeContext"/>
+            </if-empty>
+            <if-empty field-name="parameters.paymentMethodId">
+                <!-- call create Credit Card -->
+                <set field="creditCardContext.contactMechId" from-field="parameters.shipToContactMechId"/>
+                <call-service service-name="createCreditCard" in-map-name="creditCardContext">
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.paymentMethodId"/>
+                </call-service>
+            <else>
+                <!-- call update Credit Card -->
+                <set field="creditCardContext.paymentMethodId" from-field="parameters.paymentMethodId"/> 
+                <call-service service-name="updateCreditCard" in-map-name="creditCardContext">
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.paymentMethodId"/>
+                </call-service>
+            </else>
+            </if-empty>
+            <field-to-request field-name="paymentMethodId" map-name="parameters"/>
+            <field-to-result field-name="paymentMethodId" map-name="parameters"/>
+        </if-compare>
+        <if-compare value="Y" field-name="parameters.sameAsShipping"  operator="not-equals">
+            <if-not-empty field-name="contactNumber" map-name="parameters">
+                <if-empty field-name="parameters.phoneContactMechId">
+                    <!-- create home phone -->
+                    <set field="homePhoneContext.contactMechPurposeTypeId" value="PHONE_HOME"/>
+                    <!-- call create telecom service -->
+                    <call-service service-name="createPartyTelecomNumber" in-map-name="homePhoneContext">
+                        <result-to-field result-name="contactMechId" field-name="parameters.phoneContactMechId"/>
+                    </call-service>
+                <else>
+                    <set field="homePhoneContext.contactMechId" from-field="parameters.phoneContactMechId"/>
+                    <!-- call update telecom service -->
+                    <call-service service-name="updatePartyTelecomNumber" in-map-name="homePhoneContext">
+                        <result-to-field result-name="contactMechId" field-name="parameters.phoneContactMechId"/>
+                    </call-service>
+                </else>
+                </if-empty>
+                <field-to-request field-name="phoneContactMechId" map-name="parameters"/>
+                <field-to-result field-name="phoneContactMechId" map-name="parameters"/>
+            </if-not-empty>
+        </if-compare>
+        <!--==============Set Payment Method================-->
+        <set field="paymentMethodId" from-field="parameters.paymentMethodId"/>
+        <call-bsh>
+            <![CDATA[
+                checkOutHelper = new org.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, shoppingCart);
+                callResult = checkOutHelper.finalizeOrderEntryPayment(paymentMethodId, null, false, false);
+            ]]>
+        </call-bsh>
+    </simple-method>
+    
+    <simple-method method-name="createUpdateBillingAndEFTAccount" short-description="Create Billing And EFT Payment Information" login-required="false">
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="not-equals">
+            <set field="parameters.billToCity" from-field="parameters.billToCity"/>
+            <set field="parameters.billToAddress1" from-field="parameters.billToAddress1"/>
+            <set field="parameters.billToStateProvinceGeoId" from-field="parameters.billToStateProvinceGeoId"/>
+            <set field="parameters.billToPostalCode" from-field="parameters.billToPostalCode"/>
+        </if-compare>
+        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
+        <if-not-empty field-name="shoppingCart">
+            <call-object-method obj-field-name="shoppingCart" method-name="getShippingContactMechId" ret-field-name="parameters.shipToContactMechId"/>
+            <log level="info" message=" Using shipToContactMechId for Billing Contact, Value is ${parameters.shipToContactMechId}"/>
+            <call-object-method obj-field-name="shoppingCart" method-name="getPartyId" ret-field-name="partyId"/>
+            <call-object-method obj-field-name="shoppingCart" method-name="getUserLogin" ret-field-name="userLogin"/>
+        <else>
+            <set field="partyId" from-field="parameters.partyId"/>
+            <set field="userLogin" from-field="parameters.userLogin"/>
+        </else>
+        </if-not-empty>
+        <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="createEftAccount" in-map-name="parameters" out-map-name="eftAccountContext"/>
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="not-equals">
+            <set field="parameters.billToToName" value="${parameters.billTofirstName} ${parameters.billTolastName}"/>
+            <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="billToAddress" in-map-name="parameters" out-map-name="billToAddressContext"/>
+            <map-to-map map-name="billToAddressContext" to-map-name="billingToAddressAndEftAccountContext"/>
+			<map-to-map map-name="eftAccountContext" to-map-name="billingToAddressAndEftAccountContext"/>
+            <call-map-processor xml-resource="org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml"
+                processor-name="phoneNumber" in-map-name="parameters" out-map-name="homePhoneContext"/>	
+            <check-errors/>
+            <set field="billingToAddressAndEftAccountContext.partyId" from-field="partyId" />
+            <set field="homePhoneContext.partyId" from-field="partyId" />
+        </if-compare>
+        <set field="eftAccountContext.partyId" from-field="partyId" />
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="not-equals">
+            <if-empty field-name="parameters.billingContactMechId">
+                <!-- call create EFT Account and Address Service -->
+                <call-service service-name="createEftAccountAndAddress" in-map-name="billingToAddressAndEftAccountContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.billingContactMechId"/>
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.eftAccountPaymentMethodId"/>
+                </call-service>
+            <else>
+                <!-- call update EFT Account and Address Service -->
+                <set field="billingToAddressAndEftAccountContext.contactMechId" from-field="parameters.billingContactMechId"/>
+                <set field="billingToAddressAndEftAccountContext.paymentMethodId" from-field="parameters.eftAccountPaymentMethodId"/>
+                <call-service service-name="updateEftAccountAndAddress" in-map-name="billingToAddressAndEftAccountContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.billingContactMechId"/>
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.eftAccountPaymentMethodId"/>
+                </call-service>
+            </else>
+            </if-empty>
+            <field-to-request field-name="eftAccountPaymentMethodId" map-name="parameters"/>
+            <field-to-result field-name="eftAccountPaymentMethodId" map-name="parameters"/>
+            <field-to-request field-name="billingContactMechId" map-name="parameters"/>
+            <field-to-result field-name="billingContactMechId" map-name="parameters"/>
+            <field-to-session field-name="billingContactMechId"/>
+        </if-compare>
+        <if-compare value="Y" field-name="parameters.sameAsShipping" operator="equals">
+            <if-empty field-name="parameters.billingContactMechId">
+                <!-- call create Billing Location -->
+                <set field="addressPurposeContext.partyId" from-field="partyId"/>
+                <set field="addressPurposeContext.contactMechPurposeTypeId" default-value="BILLING_LOCATION"/>
+                <set field="addressPurposeContext.contactMechId" from-field="parameters.shipToContactMechId"/>
+                <call-service service-name="createPartyContactMechPurpose" in-map-name="addressPurposeContext"/>
+            </if-empty>
+            <if-empty field-name="parameters.eftAccountPaymentMethodId">
+                <!-- call create EFT Account -->
+                <set field="eftAccountContext.contactMechId" from-field="parameters.shipToContactMechId"/>
+                <call-service service-name="createEftAccount" in-map-name="eftAccountContext">
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.eftAccountPaymentMethodId"/>
+                </call-service>
+            <else>
+                <!-- call update EFT Account -->
+                <set field="eftAccountContext.paymentMethodId" from-field="parameters.eftAccountPaymentMethodId"/> 
+                <call-service service-name="updateEftAccount" in-map-name="eftAccountContext">
+                    <result-to-field result-name="paymentMethodId" field-name="parameters.eftAccountPaymentMethodId"/>
+                </call-service>
+            </else>
+            </if-empty>
+            <field-to-request field-name="eftAccountPaymentMethodId" map-name="parameters"/>
+            <field-to-result field-name="eftAccountPaymentMethodId" map-name="parameters"/>
+        </if-compare>
+        <if-compare value="Y" field-name="parameters.sameAsShipping"  operator="not-equals">
+            <if-not-empty field-name="contactNumber" map-name="parameters">
+                <if-empty field-name="parameters.phoneContactMechId">
+                    <!-- create home phone -->
+                    <set field="homePhoneContext.contactMechPurposeTypeId" value="PHONE_HOME"/>
+                    <!-- call create telecom service -->
+                    <call-service service-name="createPartyTelecomNumber" in-map-name="homePhoneContext">
+                        <result-to-field result-name="contactMechId" field-name="parameters.phoneContactMechId"/>
+                    </call-service>
+                <else>
+                    <set field="homePhoneContext.contactMechId" from-field="parameters.phoneContactMechId"/>
+                    <!-- call update telecom service -->
+                    <call-service service-name="updatePartyTelecomNumber" in-map-name="homePhoneContext">
+                        <result-to-field result-name="contactMechId" field-name="parameters.phoneContactMechId"/>
+                    </call-service>
+                </else>
+                </if-empty>
+                <field-to-request field-name="phoneContactMechId" map-name="parameters"/>
+                <field-to-result field-name="phoneContactMechId" map-name="parameters"/>
+            </if-not-empty>
+        </if-compare>
+    </simple-method>
+    
+    <simple-method method-name="createGiftCardAndExtOfflinePayment" short-description="Create GiftCard And EXT Payment Information" login-required="false">
+        <call-bsh>
+            <![CDATA[ 
+                cart = parameters.get("shoppingCart");
+                dispatcher = parameters.get("dispatcher");
+                delegator = parameters.get("delegator");
+                paymentMethodTypeId = parameters.get("paymentMethodTypeId");
+                org.ofbiz.order.shoppingcart.CheckOutHelper checkOutHelper = new org.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, cart);
+                //parameters.put("checkOutHelper",checkOutHelper);
+                Map selPaymentMethods = null;
+                selPaymentMethods = org.ofbiz.base.util.UtilMisc.toMap(paymentMethodTypeId, null);
+                //parameters.put("selPaymentMethods",selPaymentMethods);
+                callResult = checkOutHelper.checkGiftCard(parameters, selPaymentMethods);
+                parameters.put("callResult",callResult);
+                parameters.put("checkOutHelper",checkOutHelper);
+                String gcPaymentMethodId = (String) callResult.get("paymentMethodId");
+                Double giftCardAmount = (Double) callResult.get("amount");
+                Map gcCallRes = checkOutHelper.finalizeOrderEntryPayment(gcPaymentMethodId, giftCardAmount, true, true);
+            ]]>
+        </call-bsh>
+        <!--<set field="callResult" from-field="parameters"/>
+        <call-object-method obj-field-name="checkOutHelper" method-name="checkGiftCard" ret-map-name="callResult">
+            <field field-name="parameters" type="java.util.Map"/>
+            <field field-name="parameters.selPaymentMethods" type="java.util.Map"/>
+        </call-object-method>
+
+        <check-errors/>
+        <set field="checkOutHelper" from-field="parameters"/>
+        <call-object-method obj-field-name="checkOutHelper" method-name="finalizeOrderEntryPayment" ret-map-name="gcCallRes">
+            <field field-name="paymentMethodId" map-name="callResult" type="String" />
+            <field field-name="amount" map-name="callResult" type="java.lang.Double"/>
+            <string value="TRUE"/>
+            <string value="TRUE"/>
+        </call-object-method>
+        <check-errors/>-->
+    </simple-method>
+</simple-methods>
\ No newline at end of file
Index: applications/order/servicedef/services_onepagecheckoutprocess.xml
===================================================================
--- applications/order/servicedef/services_onepagecheckoutprocess.xml	(revision 0)
+++ applications/order/servicedef/services_onepagecheckoutprocess.xml	(revision 0)
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd">
+    <description>Shiping Cart Checkout Services</description>
+    <vendor>OFBiz</vendor>
+    <version>1.0</version>
+    
+    <service name="createUpdateCustomerAndShippingContact" engine="simple" auth="false"
+                location="org/ofbiz/ecommerce/customer/CustomerServices.xml" invoke="createUpdateCustomerAndShippingContact">
+        <description>Create Customer, Shipping Address and other contact details. Set shipping method type</description>
+        <attribute name="firstName" mode="IN" type="String"/>
+        <attribute name="middleName" mode="IN" type="String" optional="true"/>
+        <attribute name="lastName" mode="IN" type="String"/>
+        <attribute name="partyId" mode="INOUT" type="String" optional="true"/>
+
+        <attribute name="shippingContactMechId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="shipToAttnName" mode="IN" type="String" optional="true"/>
+        <attribute name="shipToToName" mode="IN" type="String" optional="true"/>
+        <attribute name="shipToAddress1" mode="INOUT" type="String"/>
+        <attribute name="shipToAddress2" mode="IN" type="String" optional="true"/>
+        <attribute name="shipToCity" mode="INOUT" type="String"/>
+        <attribute name="shipToStateProvinceGeoId" mode="INOUT" type="String"/>
+        <attribute name="shipToPostalCode" mode="INOUT" type="String"/>
+        <attribute name="shipToCountryGeoId" mode="IN" type="String"/>
+        <attribute name="shipping_method" mode="IN" type="String"/>
+        <attribute name="shippingTotal" mode="OUT" type="String"/>
+        <attribute name="cartGrandTotal" mode="OUT" type="String"/>
+        <attribute name="totalSalesTax" mode="OUT" type="String"/>
+        <attribute name="locale" mode="IN" optional="true" type="String"/>
+
+        <attribute name="phoneContactMechId" mode="INOUT" type="String" optional="true"/>          
+        <attribute name="countryCode" mode="IN" type="String" optional="true"/>
+        <attribute name="areaCode" mode="IN" type="String" optional="true"/>
+        <attribute name="contactNumber" mode="IN" type="String" optional="true"/>
+        <attribute name="extension" mode="IN" type="String" optional="true"/>
+
+        <attribute name="emailContactMechId" mode="INOUT" type="String" optional="true"/>         
+        <attribute name="emailAddress" mode="IN" type="String"/>
+
+        <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/>
+        <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"  mode="IN" optional="false"/>
+        <attribute name="dispatcher" type="org.ofbiz.service.LocalDispatcher"  mode="IN" optional="false"/>
+        <attribute name="delegator" type="org.ofbiz.entity.GenericDelegator"  mode="IN" optional="false"/>
+    </service>
+    <service name="createUpdateBillingAndPayment" engine="simple" auth="false"
+                location="org/ofbiz/ecommerce/customer/CustomerServices.xml" invoke="createUpdateBillingAndPayment">
+        <description>Create/Update Billing Address and Credit Card details. Set paymentMethod method type</description>
+        
+        <attribute name="sameAsShipping" mode="IN" type="String" optional="true"/>
+        
+        <attribute name="cardType" mode="IN" type="String"/>
+        <attribute name="cardNumber" mode="IN" type="String"/>
+        <attribute name="expMonth" mode="IN" type="String"/>
+        <attribute name="expYear" mode="IN" type="String"/>
+        <attribute name="expireDate" mode="IN" type="String" optional="true"/>
+        <attribute name="firstNameOnCard" mode="IN" type="String"/>
+        <attribute name="middleNameOnCard" mode="IN" type="String" optional="true" />
+        <attribute name="lastNameOnCard" mode="IN" type="String"/>
+        <attribute name="description" mode="IN" type="String" optional="true" />
+        <attribute name="companyNameOnCard" mode="IN" type="String" optional="true" />
+        <attribute name="titleOnCard" mode="IN" type="String" optional="true" />
+        <attribute name="suffixOnCard" mode="IN" type="String" optional="true" />
+        <attribute name="paymentMethodId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="eftAccountPaymentMethodId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="extOfflinePaymentMethodId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="billToAttnName" mode="IN" type="String" optional="true"/>
+        <attribute name="billToFirstName" mode="IN" type="String" optional="true"/>
+        <attribute name="billToLastName" mode="IN" type="String" optional="true"/>
+        <attribute name="billToAddress1" mode="IN" type="String" optional="true"/>
+        <attribute name="billToAddress2" mode="IN" type="String" optional="true"/>
+        <attribute name="billToCity" mode="IN" type="String" optional="true"/>
+        <attribute name="billToStateProvinceGeoId" mode="IN" type="String" optional="true"/>
+        <attribute name="billToPostalCode" mode="IN" type="String" optional="true"/>
+        <attribute name="billToCountryGeoId" mode="IN" type="String" optional="true"/>
+        <attribute name="billingContactMechId" mode="INOUT" type="String" optional="true"/>
+
+        <attribute name="areaCode" mode="IN" type="String" optional="true"/>
+        <attribute name="contactNumber" mode="IN" type="String" optional="true"/>
+        <attribute name="extension" mode="IN" type="String" optional="true"/>
+        <attribute name="phoneContactMechId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="countryCode" mode="IN" type="String" optional="true"/>        
+
+        
+        <attribute name="paymentMethodTypeId" mode="INOUT" type="String" optional="true"/>        
+        <attribute name="billingPartyId" mode="IN" type="String" optional="true"/>
+        <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/>
+        <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"  mode="IN" optional="false"/>
+        <attribute name="addGiftCard" mode="IN" type="String" optional="true"/>        
+    </service>
+    <service name="createUpdateBillingAndEFTAccount" engine="simple" auth="false"
+                location="org/ofbiz/ecommerce/customer/CustomerServices.xml" invoke="createUpdateBillingAndEFTAccount">
+        <description>Create/Update Billing Address and EFT Account details. Set paymentMethod method type</description>
+        
+        <attribute name="sameAsShipping" mode="IN" type="String" optional="true"/>
+        
+        <attribute name="nameOnAccount" mode="IN" type="String"/>
+        <attribute name="companyNameOnAccount" mode="IN" type="String" optional="true"/>
+        <attribute name="bankName" mode="IN" type="String"/>
+        <attribute name="routingNumber" mode="IN" type="String"/>
+        <attribute name="accountType" mode="IN" type="String" optional="true"/>
+        <attribute name="accountNumber" mode="IN" type="String"/>
+        <attribute name="description" mode="IN" type="String" optional="true" />
+        <attribute name="eftAccountPaymentMethodId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="billToAttnName" mode="IN" type="String" optional="true"/>
+        <attribute name="billToFirstName" mode="IN" type="String" optional="true"/>
+        <attribute name="billToLastName" mode="IN" type="String" optional="true"/>
+        <attribute name="billToAddress1" mode="IN" type="String" optional="true"/>
+        <attribute name="billToAddress2" mode="IN" type="String" optional="true"/>
+        <attribute name="billToCity" mode="IN" type="String" optional="true"/>
+        <attribute name="billToStateProvinceGeoId" mode="IN" type="String" optional="true"/>
+        <attribute name="billToPostalCode" mode="IN" type="String" optional="true"/>
+        <attribute name="billToCountryGeoId" mode="IN" type="String" optional="true"/>
+        <attribute name="billingContactMechId" mode="INOUT" type="String" optional="true"/>
+        
+        <attribute name="areaCode" mode="IN" type="String" optional="true"/>
+        <attribute name="contactNumber" mode="IN" type="String" optional="true"/>
+        <attribute name="extension" mode="IN" type="String" optional="true"/>
+        <attribute name="phoneContactMechId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="countryCode" mode="IN" type="String" optional="true"/>
+        
+        <attribute name="paymentMethodTypeId" mode="INOUT" type="String" optional="true"/>        
+        <attribute name="partyId" mode="IN" type="String" optional="true"/>
+        <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/>
+        <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"  mode="IN" optional="false"/>
+    </service>
+    <service name="createGiftCardAndExtOfflinePayment" engine="simple" auth="false"
+                location="org/ofbiz/ecommerce/customer/CustomerServices.xml" invoke="createGiftCardAndExtOfflinePayment">
+        <description>Create/Update GiftCard Information and EXT Offline Account details. Set paymentMethod method type</description>
+        
+        <attribute mode="IN" name="addGiftCard" optional="true" type="String"/>
+        <attribute mode="IN" name="giftCardNumber" optional="false" type="String"/>
+        <attribute mode="IN" name="giftCardPin" optional="false" type="String"/>
+        <attribute mode="IN" name="giftCardAmount" optional="false" type="String"/>
+        <attribute mode="IN" name="description" optional="true" type="String"/>
+        <attribute mode="IN" name="paymentMethodTypeId" optional="true" type="String" />
+
+        <attribute mode="IN" name="userLogin" optional="true" type="GenericValue"/>
+         <attribute name="dispatcher" type="org.ofbiz.service.LocalDispatcher"  mode="IN" optional="false"/>
+        <attribute name="delegator" type="org.ofbiz.entity.GenericDelegator"  mode="IN" optional="false"/>
+        <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"  mode="IN" optional="false"/>
+    </service>
+</services>
\ No newline at end of file
Index: applications/ecommerce/script/org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml
===================================================================
--- applications/ecommerce/script/org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml	(revision 0)
+++ applications/ecommerce/script/org/ofbiz/ecommerce/customer/UpdateProfileMapProcs.xml	(revision 0)
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<simple-map-processors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
+
+    <simple-map-processor name="person">
+        <process field="firstName">
+            <copy/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyFirstNameMissing"/>
+            </not-empty>
+        </process>
+        <process field="middleName">
+            <copy/>
+        </process>
+        <process field="lastName">
+            <copy/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyLastNameMissingError"/>
+            </not-empty>
+        </process>
+    </simple-map-processor>
+
+    <simple-map-processor name="password">
+        <process field="currentPassword">
+            <copy/>
+        </process>
+        <process field="newPassword">
+            <copy/>
+        </process>
+        <process field="newPasswordVerify">
+            <compare-field operator="equals" field="newPassword">
+                <fail-property resource="PartyUiLabels" property="PartyPasswordMatchError"/>
+            </compare-field>
+            <copy/>
+        </process>
+    </simple-map-processor>
+
+    <simple-map-processor name="phoneNumber">
+        <process field="phoneContactMechId">
+            <copy to-field="contactMechId" set-if-null="false"/>
+        </process>
+        <process field="countryCode">
+            <copy/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyPhoneCountryCodeMissing"/>
+            </not-empty>
+        </process>
+        <process field="areaCode">
+            <copy/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyPhoneAreaCodeMissing"/>
+            </not-empty>
+        </process>
+        <process field="contactNumber">
+            <copy/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyPhoneContactNumberMissing"/>
+            </not-empty>
+        </process>
+        <process field="extension">
+            <copy/>
+        </process>
+    </simple-map-processor>
+
+    <simple-map-processor name="emailAddress">
+        <process field="emailContactMechId">
+            <copy to-field="contactMechId" set-if-null="false"/>
+        </process>
+        <process field="emailAddress">
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyEmailAddressMissing"/>
+            </not-empty>
+            <validate-method method="isEmail">
+                <fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/>
+            </validate-method>
+            <copy/>
+        </process>
+    </simple-map-processor>
+
+    <simple-map-processor name="shipToAddress">
+        <process field="shipToContactMechId">
+            <copy to-field="contactMechId" set-if-null="false"/>
+        </process>
+        <process field="shipToToName">
+            <copy to-field="toName" set-if-null="false"/>
+        </process>
+        <process field="shipToAttnName">
+            <copy to-field="attnName" set-if-null="false"/>
+        </process>
+        <process field="shipToAddress1">
+            <copy to-field="address1"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyAddressLine1Missing"/>
+            </not-empty>
+        </process>
+        <process field="shipToAddress2">
+            <copy to-field="address2"/>
+        </process>
+        <process field="shipToCity">
+            <copy to-field="city"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyCityMissing"/>
+            </not-empty>
+        </process>
+        <process field="shipToStateProvinceGeoId">
+            <copy to-field="stateProvinceGeoId"/>
+        </process>
+        <process field="shipToPostalCode">
+            <copy to-field="postalCode"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyPostalCodeMissing"/>
+            </not-empty>
+        </process>
+        <process field="shipToCountryGeoId">
+            <copy to-field="countryGeoId"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyCountryMissing"/>
+            </not-empty>
+        </process>
+    </simple-map-processor>
+
+    <simple-map-processor name="billToAddress">
+        <process field="billingContactMechId">
+            <copy to-field="contactMechId" set-if-null="false"/>
+        </process>
+        <process field="billToToName">
+            <copy to-field="toName" set-if-null="false"/>
+        </process>
+        <process field="billToAttnName">
+            <copy to-field="attnName" set-if-null="false"/>
+        </process>
+        <process field="billToAddress1">
+            <copy to-field="address1"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyAddressLine1Missing"/>
+            </not-empty>
+        </process>
+        <process field="billToAddress2">
+            <copy to-field="address2"/>
+        </process>
+        <process field="billToCity">
+            <copy to-field="city"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyCityMissing"/>
+            </not-empty>
+        </process>
+        <process field="billToStateProvinceGeoId">
+            <copy to-field="stateProvinceGeoId"/>
+        </process>
+        <process field="billToPostalCode">
+            <copy to-field="postalCode"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyPostalCodeMissing"/>
+            </not-empty>
+        </process>
+        <process field="billToCountryGeoId">
+            <copy to-field="countryGeoId"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyCountryMissing"/>
+            </not-empty>
+        </process>
+    </simple-map-processor>
+
+    <simple-map-processor name="userLogin">
+        <process field="username">
+            <copy to-field="userLoginId"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyUserNameMissing"/>
+            </not-empty>
+        </process>
+        <process field="password">
+            <copy to-field="currentPassword"/>
+            <not-empty>
+                <fail-property resource="PartyUiLabels" property="PartyPasswordMissing"/>
+            </not-empty>
+        </process>
+        <process field="passwordVerify">
+            <compare-field operator="equals" field="password">
+                <fail-property resource="PartyUiLabels" property="PartyPasswordMatchError"/>
+            </compare-field>
+            <copy to-field="currentPasswordVerify"/>
+        </process>
+    </simple-map-processor>
+    
+    <simple-map-processor name="creditCard">
+        <make-in-string field="expireDate">
+            <in-field field="expMonth"/>
+            <constant>/</constant>
+            <in-field field="expYear"/>
+        </make-in-string>
+        <process field="paymentMethodId">
+            <copy/>
+        </process>
+        <process field="contactMechId">
+            <copy/>
+        </process>
+        <process field="companyNameOnCard"><copy/></process>
+        <process field="titleOnCard"><copy/></process>
+        <process field="suffixOnCard"><copy/></process>    
+        <process field="firstNameOnCard">
+            <copy/>
+            <not-empty>
+                <fail-message message="First Name on Card is missing"/>
+            </not-empty>
+        </process>
+        <process field="middleNameOnCard">
+            <copy/>
+        </process>
+        <process field="lastNameOnCard">
+            <copy/>
+            <not-empty>
+                <fail-message message="Last Name on Card is missing"/>
+        </not-empty>
+        </process>
+        <process field="cardType">
+            <copy/>
+            <not-empty>
+                <fail-message message="Card Type is missing"/>
+            </not-empty>
+        </process>
+        <process field="cardNumber">
+            <copy/>
+            <not-empty>
+                <fail-message message="Card Number is missing"/>
+            </not-empty>
+        </process>
+        <process field="expMonth">
+            <copy/>
+            <not-empty>
+                <fail-message message="Expiration Month is missing"/>
+        </not-empty>
+        </process>
+        <process field="expYear">
+            <copy/>
+            <not-empty>
+                <fail-message message="Expiration Year is missing"/>
+            </not-empty>
+        </process>
+        <process field="expireDate">
+            <copy/>
+            <validate-method method="isDateAfterToday">
+                <fail-message message="The expiration date is before today"/>
+            </validate-method>
+        </process>
+        <process field="description"><copy/></process>
+    </simple-map-processor>
+    <simple-map-processor name="createEftAccount">
+        <process field="paymentMethodId">
+            <copy/>
+        </process>
+        <process field="partyId">
+            <copy/>
+        </process>
+        <process field="contactMechId">
+            <copy/>
+        </process>
+        <process field="description">
+            <copy/>
+        </process>
+        <process field="bankName">
+            <copy/>
+            <not-empty>
+                <fail-message message="Bank Name is missing"/>
+            </not-empty>
+        </process>
+        <process field="routingNumber">
+            <copy/>
+            <not-empty>
+                <fail-message message="Routing Number is missing"/>
+            </not-empty>
+        </process>
+        <process field="accountType">
+            <copy/>
+            <not-empty><fail-message message="Account Type is missing"/>
+            </not-empty>
+        </process>
+        <process field="accountNumber">
+            <copy/>
+            <not-empty>
+                <fail-message message="Account Number is missing"/>
+            </not-empty>
+        </process>
+        <process field="nameOnAccount">
+            <copy/>
+            <not-empty>
+                <fail-message message="Name on Account is missing"/>
+            </not-empty>
+        </process>
+        <process field="companyNameOnAccount">
+            <copy/>
+        </process>
+    </simple-map-processor>
+    
+
+</simple-map-processors>
Index: applications/order/ofbiz-component.xml
===================================================================
--- applications/order/ofbiz-component.xml	(revision 609890)
+++ applications/order/ofbiz-component.xml	(working copy)
@@ -45,6 +45,7 @@
     <service-resource type="model" loader="main" location="servicedef/services_return.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_opportunity.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_upgrade.xml"/>
+    <service-resource type="model" loader="main" location="servicedef/services_onepagecheckoutprocess.xml"/>
     <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
     
     <test-suite loader="main" location="testdef/OrderTest.xml"/>
Index: applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
===================================================================
--- applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml	(revision 609890)
+++ applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml	(working copy)
@@ -36,7 +36,8 @@
     <handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/>
     <handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
     <handler name="simplecontent" type="view" class="org.ofbiz.content.view.SimpleContentViewHandler"/>
-
+    <!-- Add a json handler -->
+    <handler name="jsonservice" type="request" class="org.ofbiz.webapp.event.JSONServiceEventHandler"/>
     <!-- Events run from here for the first hit in a visit -->
     <firstvisit>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="autoLoginCheck"/>
@@ -1555,6 +1556,62 @@
         <security auth="false" https="false"/>
         <response name="success" type="view" value="ViewSimpleContent"/>
     </request-map>
+    
+    <!-- ================ One Page QuickAnonymous Check Out ================= -->
+    
+    <request-map uri="OnePageQuickAnonymousCheckOut">
+        <security auth="false" https="true"/>
+        <response name="success" type="view" value="CheckoutDetails"/>
+    </request-map>
+    <request-map uri="createUpdateCustomerAndShippingContact">
+        <security https="true" auth="false"/> 
+        <event type="jsonservice" invoke="createUpdateCustomerAndShippingContact"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+    
+    <request-map uri="createUpdateBillingAndPayment">
+        <security https="true" auth="false"/>
+        <event type="jsonservice" invoke="createUpdateBillingAndPayment"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+    
+    <request-map uri="createUpdateBillingAndEFTAccount">
+        <security https="true" auth="false"/>
+        <event type="jsonservice" invoke="createUpdateBillingAndEFTAccount"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+
+    <request-map uri="createGiftCardAndExtOfflinePayment">
+        <security https="true" auth="false"/>
+        <event type="jsonservice" invoke="createGiftCardAndExtOfflinePayment"/>
+        <!--<event type="bsf" path="" invoke="org/ofbiz/ecommerce/order/processPaymentSettings.bsh"/>-->
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+    
+    <request-map uri="addCommentsCompleteOrder">
+         <security https="true" auth="false"/>
+         <event type="bsf" invoke="org/ofbiz/ecommerce/customer/processComments.bsh"/>
+         <response name="success" type="request" value="quickAnonSetShippingBeforePayment1"/>
+         <response name="error" type="view" value="showcart"/>
+     </request-map>
+    
+    <request-map uri="quickAnonSetShippingBeforePayment1">
+        <security direct-request="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.shipping.ShippingEvents" invoke="getShipEstimate"/>
+        <response name="success" type="request" value="quickAnonCalcTaxBeforePayment"/>
+        <response name="error" type="view" value="showcart"/>
+    </request-map>
+    
+     <request-map uri="quickAnonCalcTaxBeforePayment">
+        <security direct-request="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="calcTax"/>
+        <response name="success" type="request" value="processorder"/>
+        <response name="error" type="view" value="CheckoutDetails"/>
+    </request-map>
     <!-- End of Request Mappings -->
 
     <!-- View Mappings -->
@@ -1679,5 +1736,8 @@
     <view-map name="LatestResponses" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#LatestResponses"/>
 
     <view-map name="ViewSimpleContent" page="" type="simplecontent"/>
+    
+     <!-- ================ One Page QuickAnonymous Check Out View================= -->
+    <view-map name="CheckoutDetails" type="screen" page="component://ecommerce/widget/OrderScreens.xml#CheckoutDetails"/>
     <!-- End of View Mappings -->
 </site-conf>
Index: applications/ecommerce/webapp/ecommerce/images/cartrules.js
===================================================================
--- applications/ecommerce/webapp/ecommerce/images/cartrules.js	(revision 0)
+++ applications/ecommerce/webapp/ecommerce/images/cartrules.js	(revision 0)
@@ -0,0 +1,165 @@
+Event.observe(window,'load',function(){
+   Event.observe($('step2open'),'click',function(e){
+       $('completed1').hide();
+       if($('step3').visible){
+           var targetDiv = $('step3');
+           new Effect.BlindUp(targetDiv,{duration: 0.5}); 
+           new Effect.BlindDown('step2',{duration: 0.3});  
+       }else{
+          if($('step4').visible){
+              var targetDiv = $('step4');
+              new Effect.BlindUp(targetDiv,{duration: 0.5}); 
+              new Effect.BlindDown('step2',{duration: 0.3});
+          }
+       }
+   });
+   
+   Event.observe($('step3open'),'click',function(e){
+       var targetDiv = $('step4');
+       $('completed2').hide();
+       new Effect.BlindUp(targetDiv,{duration: 0.5}); 
+       new Effect.BlindDown('step3',{duration: 0.3});  
+   });
+   
+   
+   Event.observe($('step1close'),'click',function(e){
+       console.log($('paymentMethodTypeOptionList').value);
+       new Ajax.Request($('shippingContactAndMethodType').action,
+            {asynchronous: true, parameters: $('shippingContactAndMethodType').serialize(),  requestHeaders: {Accept: 'application/json'},
+              onSuccess: function(transport){
+               var data = transport.responseText.evalJSON(true);
+               console.log("shippcontactmechid "+data.shippingContactMechId);
+               console.log("partyid "+data.partyId);
+               console.log("phonecontactmechid "+data.phoneContactMechId);
+               console.log("emailcontactmechid "+data.emailContactMechId);
+               $('shippingContactMechId').value = data.shippingContactMechId;
+               $('shippingPartyId').value = data.partyId;
+               $('phoneContactMechId').value = data.phoneContactMechId;
+               $('emailContactMechId').value = data.emailContactMechId;
+               var targetDiv = $('step2');
+               new Effect.BlindUp(targetDiv,{duration: 0.3});  
+               new Effect.BlindDown('step3',{duration: 0.5}); 
+               getPaymentInformation();
+               new Effect.Appear('completed1') ;
+             }
+            });
+       Event.stop(e);
+   });
+   
+   Event.observe($('step2close'),'click',function(e){
+       console.log($('paymentMethodId').value);
+       new Ajax.Request($('billingContactAndPaymentMethod').action,
+           {asynchronous: true, parameters: $('billingContactAndPaymentMethod').serialize(),  requestHeaders: {Accept: 'application/json'},
+             onSuccess: function(transport){
+               if($('addGiftCard').checked){
+                new Ajax.Request('/ecommerce/control/createGiftCardAndExtOfflinePayment',{parameters: $('billingContactAndPaymentMethod').serialize(),  requestHeaders: {Accept: 'application/json'},
+                  onSuccess: function(transport){
+                      var data = transport.responseText.evalJSON(true);
+                      console.log(data);
+                      console.log(data._ERROR_MESSAGE_LIST_);
+                      console.log(data._ERROR_MESSAGE_);
+                  },
+                  onFailer: function(transport){
+                      var data = transport.responseText.evalJSON(true);
+                      console.log(data._ERROR_MESSAGE_LIST_);
+                      console.log(data._ERROR_MESSAGE_);
+                  }
+                });
+               }
+               var data = transport.responseText.evalJSON(true);
+               console.log("billToContactMechId "+data.billingContactMechId);
+               console.log("paymentMethodId "+data.paymentMethodId);
+               console.log("billToPhoneContactMechId "+data.phoneContactMechId);
+               console.log("billToEmailContactMechId "+data.emailContactMechId);
+               console.log("eftAccountPaymentMethodId "+data.eftAccountPaymentMethodId);
+               console.log("extOfflinePaymentMethodId "+data.extOfflinePaymentMethodId);
+               console.log("paymentMethodTypeId "+data.paymentMethodTypeId);
+               $('billToContactMechId').value = data.billingContactMechId;
+               $('billToPhoneContactMechId').value = data.phoneContactMechId;
+               $('paymentMethodId').value = data.paymentMethodId;
+               $('eftAccountPaymentMethodId').value = data.eftAccountPaymentMethodId;
+               $('extOfflinePaymentMethodId').value = data.extOfflinePaymentMethodId;
+               $('paymentMethodTypeId').value = data.paymentMethodTypeId;
+               var targetDiv = $('step3');
+               new Effect.BlindUp(targetDiv,{duration: 0.3});  
+               new Effect.BlindDown('step4',{duration: 0.5}); 
+               new Effect.Appear('completed2') ;
+             }
+           });
+       
+       Event.stop(e);       
+   });
+   
+   Event.observe($('paymentMethodTypeOptionList'),'change',getPaymentInformation);
+   
+   Event.observe($('billingToggle'),'click',function(e){
+      console.log($('billingToggle'));
+      console.log("inside log");
+      if($('billingToggle').checked){
+         $('billingaddress').hide();
+      }else{
+          $('billingaddress').show();
+      }
+   }); 
+   
+   Event.observe($('addGiftCard'),'click',function(e){
+      if($('addGiftCard').checked){
+         $('giftCardSection').show();
+      }else{
+          $('giftCardSection').hide();
+      }
+   });
+ 
+});
+
+    function getPaymentInformation(){
+        console.log($('paymentMethodTypeOptionList').value);
+        
+        if(($('paymentMethodTypeOptionList').value) == "CREDIT_CARD"){
+            $('paymentMethodTypeId').value = "CREDIT_CARD";
+            console.log("creditCard info..");   
+            $('billingContactAndPaymentMethod').action = "createUpdateBillingAndPayment";
+            if($('eftAccountInfoSection').visible){
+                 var targetDiv = $('eftAccountInfoSection');
+                 new Effect.BlindUp(targetDiv,{duration: 0.3});     
+            }              
+            new Effect.BlindDown('creditCardInfoSection', {duration: 0.5});           
+        }else{
+            if(($('paymentMethodTypeOptionList').value) == "EFT_ACCOUNT"){
+            $('paymentMethodTypeId').value = "EFT_ACCOUNT";
+            console.log("eftaccount show..");            
+            $('billingContactAndPaymentMethod').action = "createUpdateBillingAndEFTAccount";
+            if($('creditCardInfoSection').visible){
+               var targetDiv = $('creditCardInfoSection');
+               new Effect.BlindUp(targetDiv,{duration: 0.3});     
+            }
+            new Effect.BlindDown('eftAccountInfoSection', {duration: 0.5});           
+         }else{
+            if(($('paymentMethodTypeOptionList').value) == "EXT_OFFLINE"){
+            $('paymentMethodTypeId').value = "EXT_OFFLINE";
+            if($('creditCardInfoSection').visible){
+               var targetDiv = $('creditCardInfoSection');
+               new Effect.BlindUp(targetDiv,{duration: 0.3});     
+            }
+            if($('eftAccountInfoSection').visible){
+              console.log("in ofline if for eft..");
+              var targetDiv = $('eftAccountInfoSection');
+              new Effect.BlindUp(targetDiv,{duration: 0.3});     
+            }                        
+         }else{
+            if(($('paymentMethodTypeOptionList').value) == "none"){
+            $('paymentMethodTypeId').value = "none";
+            if($('creditCardInfoSection').visible){
+               var targetDiv = $('creditCardInfoSection');
+               new Effect.BlindUp(targetDiv,{duration: 0.3});     
+            }
+            if($('eftAccountInfoSection').visible){
+              var targetDiv = $('eftAccountInfoSection');
+              new Effect.BlindUp(targetDiv,{duration: 0.3});     
+            }                 
+         }
+        }
+       }
+      }
+    }
+
Index: applications/order/config/OrderUiLabels.properties
===================================================================
--- applications/order/config/OrderUiLabels.properties	(revision 609890)
+++ applications/order/config/OrderUiLabels.properties	(working copy)
@@ -1016,3 +1016,5 @@
 shoppinglistevents.problem_adding_product_to_cart=Could NOT add product ${productId} to cart.
 shoppinglistevents.select_items_to_add_to_list=Please select item(s) to add to the shopping list.
 shoppinglistevents.shoppingListId_is_required_parameter=shoppingListId is a required parameter.
+
+EcommerceOnePageCheckoutQuick=One Page Quick Anonymous Checkout
\ No newline at end of file
Index: applications/ecommerce/config/EcommerceUiLabels.properties
===================================================================
--- applications/ecommerce/config/EcommerceUiLabels.properties	(revision 609890)
+++ applications/ecommerce/config/EcommerceUiLabels.properties	(working copy)
@@ -450,3 +450,17 @@
 QuoteHistory=Quote History
 RequestHistory=Request History
 ShipmentItems=Shipment Items
+
+
+FirstNameOnCardMissingError=First Name on the Card Missing
+LastNameOnCardMissingError=Last Name on the Card Missing
+CardTypeMissingError=Credit Card Type Missing
+CardNumberMissingError=Credit Card Number Missing
+ExpMonthMissingError=Credit Card Expiration Month Missing
+ExpYearMissingError=Credit Card Expiration Year Missing
+ExpDateBeforeTodayError=Credit Card Expiration Date is before today
+BankNameMissingError=Bank Name is missing
+RoutingNumberMissingError=Routing Number is missing
+AccountTypeMissingError=Account Type is missing
+AccountNumberMissingError=Account Number is missing
+NameOnAccountMissingError=Name on Account is missing
Index: applications/ecommerce/webapp/ecommerce/images/quickanononepagecheckoutprocess.css
===================================================================
--- applications/ecommerce/webapp/ecommerce/images/quickanononepagecheckoutprocess.css	(revision 0)
+++ applications/ecommerce/webapp/ecommerce/images/quickanononepagecheckoutprocess.css	(revision 0)
@@ -0,0 +1,948 @@
+/* QuickAnonOnePageCheckoutProcess CSS */
+
+html, body {
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  background:#ffffff;
+  color:#000000;
+  text-align:center;
+}
+
+/*TABLE, TD, INPUT, SELECT, P, li
+{
+	font-size: 10pt;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+}*/
+
+
+
+a:link, a:visited { color: #237ae3; text-decoration:none;}
+/*a:link, a:visited #vudulink { color: #237ae3; text-decoration:none;}*/
+a:hover { color: #00bbbb; }
+a:active { color: #006666; }
+
+.showTip a {
+}
+
+#toolTip { 
+	position:absolute;
+	z-index:1000;
+	width:200px;
+	background:#060606;
+	border:1px solid #101010;
+	text-align:left;
+	padding:5px;
+	min-height:10px;
+	-moz-border-radius:3px; 
+}
+
+#toolTip p {
+	margin:0;
+	padding:0;
+	color:#fff;
+	font:11px/12px verdana,arial,sans-serif; 
+}
+
+#toolTip strong {
+	color: #237ae3;
+	}
+
+
+/*.theform {
+	padding:10px;
+	margin:0;
+	width:572px;
+
+}*/
+
+.theform fieldset {
+	border: 0;
+	margin: 0;
+	float: left;
+	text-align:left;
+	}
+
+
+.theform fieldset label {
+	font-size: 10px;
+	font-family: Verdana,Arial,Helvetica,Sans-serif;
+	text-decoration: none;
+}
+	
+/*.theform fieldset label.choice{
+	clear: none;
+	margin: 0px 0px 0px 20px;
+	padding: 0px 0px 20px 0px;
+	width:500px;
+}*/
+
+/*.theform fieldset label.radioCC{
+	clear: none;
+	margin: 0px 0px 0px 20px;
+	padding: 0px 0px 20px 0px;
+	width:30px
+}*/		
+	
+.theform fieldset input {
+	background:white none repeat scroll 0%;
+	border:1px solid #999999;
+    font-family: verdana,Arial,Helvetica,sans-serif;
+	font-size: 8pt;
+	margin:2px;
+	}
+	
+html>body .theform fieldset input .large {
+	font-size: 12px;
+	height: 22px;
+	padding:4px;
+	background:#2a2a2a;
+	border:none;
+	color:#ccc;
+	width:215px;
+	}
+	
+.theform fieldset input.large {
+	font-size: 12px;
+	height: 22px;
+	padding:4px;
+	background:#2a2a2a;
+	border:none;
+	color:#ccc;
+	width:215px;
+	}	
+	
+	
+.theform fieldset select{
+	background:white none repeat scroll 0%;
+	border:1px solid #999999;
+    font-family: verdana,Arial,Helvetica,sans-serif;
+	font-size: 8pt;
+	margin:2px;
+}
+
+.theform fieldset select.country{
+	padding:0px;
+	margin-top:2px;
+	background:#2a2a2a;
+	border:none;
+	color:#ccc;
+	font-size: 12px;
+	height:20px;
+	width:215px;
+}
+
+.theform fieldset select.state{
+	padding:0px;
+	margin-top:2px;
+	background:#2a2a2a;
+	border:none;
+	color:#ccc;
+	font-size: 12px;
+	height:20px;
+	width:215px;
+}
+	
+.theform fieldset input.checkbox{
+	clear: both;
+	float: left;
+	padding-top: 0px;
+	margin: 0px;
+	height:auto;
+	border:1px solid #000;
+}
+	
+.theform fieldset textarea {
+	padding:4px;
+	background:#2a2a2a;
+	border:none;
+	color:#ccc;
+	width:195px;
+	display:block;
+	text-align:left;
+	height:106px;
+	white-space: normal;
+	overflow:hidden;
+	}
+	
+	
+.theform fieldset span{
+	margin:0 5px 0 0;
+	font-size: 7pt;
+}
+
+.theform fieldset span a{
+	color:#237ae3;
+	cursor:pointer;
+	
+}
+
+/*.theform fieldset span .CVV{
+position:relative;
+	top:4px;
+	
+}*/
+
+.theform fieldset span{
+	float:left;
+}
+
+/*.theform fieldset .billingslider{
+	float:left;
+	width:180px;
+	clear:both
+}*/
+
+/*.couponlink{
+	clear:both;
+	padding-top:10px;
+	font-size:12px
+}*/
+
+/*.cartsum {
+	float:right;
+	width:572px;
+	border-top:1px solid #2a2a2a;
+	}
+	
+	
+
+.cartsum-confirmation {
+border-top:1px solid #2a2a2a;
+	float:left;
+	width:95%;
+	}
+	
+.email-confirmation {
+border-top:1px solid #2a2a2a;
+	float:left;
+	width:560px;
+	}	
+
+.subdivider {
+	width:300px;
+	border-top:1px solid #2a2a2a;
+	clear:both;
+	float:right;
+	margin:0px;
+	padding:0px;
+}
+
+.totaltext {
+	float:left;
+	text-align:right;
+	width:70%;
+	margin-right:5px;
+	font-size:12px;
+	font-weight:bold;
+	color: #ff8f00;
+}
+	
+.subtext {
+	float:left;
+	text-align:right;
+	width:70%;
+	margin-right:5px;
+	font-size:12px;
+	font-weight:bold;
+}
+
+.theform input.checkout {
+	height: 20px;
+	font-size: 12px;
+	color: #ccc; 
+	background: #2a2a2a;
+	font-weight: bold;
+	border:none;
+	margin:5px 0 15px 0;
+	padding:0px 1px 0px 1px;
+	cursor:pointer;
+	}
+	
+.theform a.profileBtn {
+	height: 20px;
+	font-size: 12px;
+	color: #ccc; 
+	background: #2a2a2a;
+	font-weight: bold;
+	border:none;
+	margin:5px 0 15px 0;
+	padding:4px 6px 4px 6px;
+	cursor:pointer;
+	}	
+	
+.theform input.applycode {
+	height: 20px;
+	font-size: 10px;
+	color: #ccc; 
+	background: #2a2a2a;
+	font-weight: bold;
+	border:none;
+	margin-top:5px;
+	margin-left:0px;
+	padding:1px 1px 0px 1px;
+	float:left;
+}
+	
+.confirmationOptions  {
+	margin:-20px 0 0px 0;
+}
+	
+.confirmationOptions  .text {
+	margin:0px 0 0px 0;
+	width:45%;
+}	
+	
+.confirmationOptions  .text p {
+	margin:0px 0 0px 5px;
+	font-size:13px;
+	color:#bbbbbb
+}	
+	
+.confirmationOptions  .text .disclaimer {
+	margin:5px 0 0px 5px;
+	font-size:9px;
+	color:#bbbbbb
+}					
+	
+.confirmationOptions a {
+	border:none;
+	margin:0;
+	padding:5px 0px 2px 0px;
+	cursor:pointer;
+}
+	
+.confirmationOptions .title {
+	height: 20px;
+	color: #fff; 
+	font-size:18px;
+	font-weight: bold;
+	border:none;
+	margin:5px 0 15px 0;
+	padding:2px 4px 2px 4px;
+}
+	
+.stepstitle {
+	height: 15px;
+	color: #ff8f00; 
+	font-size:14px;
+	font-weight: bold;
+	margin:-15px 0 0 0;
+	padding:0px 4px 0px 25px;
+}		
+	
+#thelogin {
+	width:572px;
+}	
+		
+#theloginfields {
+	float:left;
+	width:250px;
+	margin:0px 0px 0px 0px;
+}
+	
+#thenewaccountfields {
+	float:right;
+	width:250px;
+	margin:0;
+}
+	
+.theshippingfields {
+	float:left;
+	width:230px;
+	margin:0px 0px 0px 0px;
+	font-size:12px;
+}
+	
+.thebillingfields {
+	float:right;
+	width:230px;
+	margin:0;
+	font-size:12px;
+}
+
+.editleftfields {
+	float:left;
+	width:260px;
+	margin:0px 0px 0px 0px;
+	font-size:12px;
+}
+	
+.editrightfields {
+	float:right;
+	width:260px;
+	margin:0;
+	font-size:12px;
+}						
+*/
+img {
+	border:none;
+}
+
+.left {
+	float:left;
+	width:300px;
+	padding-right:5px;
+}
+
+.right {
+	float:left !important;
+	width:225px !important;
+	padding-left:100px !important;
+}
+
+/*.cartTable {
+	
+	width:572px;
+}
+
+.startButton {
+	float:right;
+	position:relative;
+	margin-top:-50px;
+	padding-right:10px;
+	width:40%;
+}
+*/	
+.theform input.disabled {
+	border: 1px solid #F2F2F2;
+	background-color: #F2F2F2;
+}
+
+.theform input.required, textarea.required {
+	
+}
+
+.theform input.validation-failed, textarea.validation-failed {
+	color:#ff8f00;
+}
+
+.theform input.validation-passed, textarea.validation-passed {
+	border: none;
+	color : #237ae3;
+}
+
+.theform .validation-advice {
+	margin: 2px 0 2px 0;
+	padding: 5px;
+	color:#237ae3;
+	font-weight: bold;
+	font-size:10px;
+}
+
+.theform .custom-advice {
+	margin: 2px 0 2px 0;
+	padding: 5px;
+	color:#237ae3;
+	font-weight: bold;
+	font-size: 10px;
+	clear: both;
+}
+
+.theform .form-row {
+	clear: both;
+	padding: 0px 0px 2px 0px;
+	width:450px;
+}
+
+.theform .field-label {
+	margin-left:0px;
+	float:left;
+	width:185px;
+	text-align:right;
+	padding-top: 5px;
+}
+
+.theform .field-widget {
+	float:right;
+	width:240px;
+}
+
+.theform fieldset  span.requiredLabel {
+	
+	float:none;
+}
+
+.theform fieldset .comments textarea{
+	width:520px;
+}
+	
+/*.submitBtn {
+	clear:both;
+	float:right;
+	margin-right:20px;
+	margin-top:0px;
+	padding-bottom:20px;
+}
+*/	
+.theform fieldset .stepBtn {
+	padding:5px 0 5px 0;
+}	
+			
+.form-container .step1Icon {
+	margin-left:-75px;
+	margin-top:-35px;
+	background:url(/buynow/images/step1.gif) no-repeat;
+	position:absolute;
+	width:59px;
+	height:58px;
+}
+
+.form-container .step2Icon {
+	margin-left:-75px;
+	margin-top:-35px;
+	background:url(/buynow/images/step2.gif) no-repeat;
+	position:absolute;
+	width:59px;
+	height:58px;
+}
+	
+.form-container .step3Icon {
+	margin-left:-75px;
+	margin-top:-35px;
+	background:url(/buynow/images/step3.gif) no-repeat;
+	position:absolute;
+	width:59px;
+	height:58px;
+}
+	
+.form-container {
+	width:572px;
+	padding:20px 0px 20px 0px;
+	clear:both;
+}
+	
+/*.cartSteps {
+	clear:both;
+	padding:25px 10px 5px 10px;
+	margin-bottom:5px;
+	width:100%;
+	margin-left:0px;
+}
+
+.cartSteps ul{
+	list-style:none;
+	color:#fff;
+	font-size:12px;
+	font-weight:bold;
+	border-bottom:1px solid #121212;
+}
+
+.cartSteps ul li{
+	display:inline;
+	margin-right:20px;
+}
+
+.cartSteps ul li.active{
+	display:inline;
+	color: #237ae3;
+}
+
+dt, dl, dd, ul, li {
+	list-style-type: none;
+	margin: 0 0px 0 0;
+	padding: 2px;
+}
+
+#menu {
+	position : absolute;
+	left: 130px;
+	top: -14px;
+	width:700px;
+	font-size:12px;
+	z-index:1;
+}
+
+#menu dl {
+	float: left;
+	padding-bottom:15px;
+}
+
+#menu ul {
+	padding-bottom:15px;
+}
+
+#menu li {
+	display: inline;
+}
+
+#menu .divider {
+	display: inline;
+	width:1px;
+	height:24px;
+	border:none;
+	padding:0px 0px 0px 3px;
+	margin:0px;
+}
+
+#menu a {
+	text-decoration: none;
+	color: #aaaaaa;
+	padding:4px 4px 4px 4px;
+	background:none;
+	border:none;
+}
+
+#menu li.active a{
+	text-decoration: none;
+	color: #fff;
+	border: none;
+	margin-left:0px;
+	margin-right:0px;
+	background: transparent url(/buynow/images/img-line.gif) repeat-x 100% 100%;
+}
+
+#menu li.active a:hover {
+	text-decoration: none;
+	color: #fff;
+	border: none;
+	margin-left:0px;
+	margin-right:0px;
+	background: transparent url(/buynow/images/img-line.gif) repeat-x 100% 100%;
+}
+
+
+#menu dt.active a{
+	text-decoration: none;
+	color: #fff;
+	border: none;
+	margin-left:0px;
+	margin-right:0px;
+	background: transparent url(/buynow/images/img-line.gif) repeat-x 100% 100%;
+}
+
+#menu dt.active a:hover {
+	text-decoration: none;
+	color: #fff;
+	border: none;
+	margin-left:0px;
+	margin-right:0px;
+	background: transparent url(/buynow/images/img-line.gif) repeat-x 100% 100%;
+}
+
+
+#menu a:hover {
+	text-decoration: none;
+	color: #fff;
+	border: 3px solid #ff8f00;
+	margin-left:-3px;
+	margin-right:-3px;
+	background:none;
+}
+
+#smenu1 {
+	position: absolute;
+	left: 0;
+	font-size: 12px;
+	display: none;
+}
+
+#smenu2 {
+	position: absolute;
+	left: 66px;
+	top:32px;
+	font-size: 12px;
+	width:300px;
+	display: none;
+}
+
+#smenu3 {
+	position: absolute;
+	left: 23px;
+	top:32px;
+	font-size: 12px;
+	width:350px;
+	display: none;
+}
+
+#smenu4 {
+	position: absolute;
+	left: 114px;
+	top:32px;
+	font-size: 12px;
+	display: none;
+}
+
+#smenu5 {
+	position: absolute;
+	left: 44px;
+	top:32px;
+	font-size: 12px;
+	width:500px;
+	display: none;
+}
+
+#smenu6 {
+	position: absolute;
+	left: 368px;
+	top:32px;
+	font-size: 12px;
+	width:400px;
+	display: none;
+}
+
+#menu img {
+	border:none;
+	margin-top:15px;
+	margin-bottom:-8px;
+	height:24px;
+	padding:2px 0 2px 0;
+}
+
+#menu span.cartTotal {
+	position:relative;
+	top:0px;
+	font-size:12px;
+	font-family:Verdana, Arial, Helvetica, sans-serif;
+	color: #237ae3;
+}
+
+#menu span.cartTotal a {
+	text-decoration: none;
+	color: #237ae3;
+	padding:6px 4px 6px 4px;
+	
+}
+
+
+
+#menu span.cartTotal a:hover {
+	text-decoration: none;
+	color: #fffff;
+	border: none;
+	margin-left:0px;
+	margin-right:0px;
+}
+
+
+#checkoutforms {
+	margin-left:60px;
+}
+*/	
+.completed {
+	display:inline;
+	color: #ff8f00;
+	margin-left:25px;
+}
+
+.completed  span {
+	color: #ff8f00;
+}
+
+.completed  span a {
+	color: #ff8f00;
+}
+
+.completed  span a:hover {
+	color: #ff8f00;
+}
+
+.completed a {
+	color: #ff8f00;
+}
+
+.completed a:hover {
+	color: #ff8f00;
+}
+
+/*.myBox {
+    margin: 10px 0 30px 0;
+    border: 0px solid #161616;
+    color: #ffffff;
+    width: 572px;
+    padding: 10px;
+    text-align: left;
+    background:#161616;
+}
+
+.cartcontainer {
+	width: 612px;
+	margin: 0 auto;
+	display: inline-block;
+}
+
+.cartcontainer, #cartsearch-box, #cartgallery-images{
+	display: block;
+}
+
+.cartcontainer:after, #cartsearch-box:after, #cartgallery-images:after{
+	content: ".";
+	display: block;
+	height: 0;
+	clear: both;
+	visibility: hidden;
+}
+
+#cartlayout {
+	font-size: 12px;
+}
+
+#cartlayout-right {
+	background: #161616;
+	width: 250px;
+	padding:0;
+	float: right;
+	border-right: 1px solid #000;
+	border-bottom: 1px solid #000;
+}
+
+#cartlayout-left {
+	width: 325px;
+	float: left;
+}
+
+#cartaccordian a {
+	display: block;
+	color: #f2f2f2;
+	text-decoration: none;
+	font-size: 14px;
+	margin-top: 2px;
+	padding: 5px;
+	background:#333;
+}
+
+#cartheader a {
+	color: #f4f2e5;
+	text-decoration: none;
+}
+
+#cartheader a:hover {
+	color: #d1890a;
+	text-decoration: none;
+}
+
+.thecategoryform h3 {
+	color: #b97902;
+	font-size: 12px;
+	line-height: 18px;
+	font-weight: bold;
+}
+
+#cartheader {
+	color: #f4f2e5;
+	font-size: 11px;
+	background: #000;
+}
+
+#cartheader-left {
+	width: 350px;
+	padding: 15px 0 0 10px;
+	float: left;
+}
+
+#cartheader-right {
+	width: 450px;
+	float: right;
+}
+
+#cartnavigation {
+	text-align: right;
+	padding-top: 13px;
+}
+
+
+#cartsearch-box {
+	display: inline-block;
+}
+
+#cartsearch-box {
+	background: #161616;
+	width: 250px;
+	padding: 0 4px 7px;
+	color:#fff;
+	margin-bottom:5px;
+}
+
+.specTitle {
+	color:#237ae3;
+	cursor:pointer;
+	}
+	
+.specTitle a {
+	color:#237ae3;
+	cursor:pointer;
+}
+	
+.specTitle a:hover {
+	color:#237ae3;
+	cursor:pointer;
+}	
+
+.categoryCheckOut {
+	width:98%;
+	text-align:right;
+	font-size:14px;
+	font-weight:bold;
+	text-transform:capitalize;
+}
+
+.categoryCheckOutlast {
+	width:100%;
+	text-align:right;
+	font-size:14px;
+	font-weight:bold;
+	text-transform:capitalize;
+	margin-top:0;
+}
+
+.categoryPrice {
+	color:#237ae3;
+	font-size:14px;
+	font-weight:bold;
+}
+*/	
+.note {
+color:#ff8f00;
+}
+/*
+.profileAccountlinks a {
+	color:#aaaaaa;
+}	
+
+form .field {
+    margin: 10px 0;
+}
+label {
+    display: block;
+}
+
+.confirmationOptions  .text1 {
+	margin:0px 0 0px 0;
+	width:100%;
+}
+
+.addtocart {
+    float:right;
+}
+*/
+#stepButton {
+	position: relative;
+	left: 1000px;
+}
+
+#sameAsShipCheckBox {
+	position: relative;
+	left: 173px;
+	margin-top: 10px;
+}
+
+#sameAsShipLabel {
+    position: relative;
+	left: 188px;	
+}
+
+.theform fieldset .textAreaBox{
+	background:white none repeat scroll 0%;
+	border:1px solid #999999;
+    font-family: verdana,Arial,Helvetica,sans-serif;
+	font-size: 8pt;
+	margin:2px;
+	color: black;
+}
+
+.addGiftCardCheckBox {
+    padding-left:160px;
+}
+
+.addGiftCardLabel {
+	padding-left: 190px;
+}
+/* End of Stylesheet */
